This commit is contained in:
Daniel Larimer 2012-09-23 20:42:45 -04:00
parent 98675754d8
commit df204d5e84

View file

@ -83,6 +83,7 @@ namespace fc {
wlog( "%s", my->name.c_str() ); wlog( "%s", my->name.c_str() );
// break all promises, thread quit! // break all promises, thread quit!
while( my->blocked ) {
fc::context* cur = my->blocked; fc::context* cur = my->blocked;
while( cur ) { while( cur ) {
fc::context* n = cur->next; fc::context* n = cur->next;
@ -91,6 +92,11 @@ namespace fc {
cur->except_blocking_promises( thread_quit() ); cur->except_blocking_promises( thread_quit() );
cur = n; cur = n;
} }
if( my->blocked ) {
wlog( "still blocking... whats up with that?");
debug( "on quit" );
}
}
BOOST_ASSERT( my->blocked == 0 ); BOOST_ASSERT( my->blocked == 0 );
//my->blocked = 0; //my->blocked = 0;
@ -102,7 +108,7 @@ namespace fc {
my->sleep_pqueue.clear(); my->sleep_pqueue.clear();
// move all idle tasks to ready // move all idle tasks to ready
cur = my->pt_head; fc::context* cur = my->pt_head;
while( cur ) { while( cur ) {
fc::context* n = cur->next; fc::context* n = cur->next;
cur->next = 0; cur->next = 0;