Changes in / [8d182b1:5625427]
- Files:
-
- 2 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/coroutine.cfa
r8d182b1 r5625427 318 318 void defaultResumeAtHandler( exception_t * except ) { 319 319 __cfaehm_allocate_exception( except ); 320 free( except ); 320 321 __cfaehm_begin_unwind( (void(*)(exception_t *))defaultTerminationHandler ); 321 322 } 322 323 struct ehm_cleanup {324 exception_t * ex;325 };326 327 void ^?{}( ehm_cleanup & this ) { free( this.ex ); }328 323 329 324 bool poll( coroutine$ * cor ) libcfa_public { … … 335 330 // otherwise loop and throwResume all pending exceptions 336 331 while ( nl_ex != 0p ){ 337 ehm_cleanup ex_holder{ nl_ex->the_exception };332 exception_t * ex = nl_ex->the_exception; 338 333 free( nl_ex ); 339 __cfaehm_throw_resume( ex _holder.ex, defaultResumeAtHandler );334 __cfaehm_throw_resume( ex, defaultResumeAtHandler ); 340 335 336 // only reached if resumption handled. other dealloc handled in defaultResumeAtHandler 337 free( ex ); 341 338 nl_ex = pop_ehm_head( cor ); 342 339 }
Note:
See TracChangeset
for help on using the changeset viewer.