- Timestamp:
- Aug 7, 2023, 3:08:14 PM (17 months ago)
- Branches:
- master
- Children:
- 7c2820e
- Parents:
- 27f2bef
- Location:
- libcfa/src/concurrency
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/coroutine.cfa
r27f2bef rc34bb1f 298 298 } 299 299 300 bool poll( coroutine$ * cor ) libcfa_public { 301 nonlocal_exception * nl_ex = pop_ehm_head( cor ); 302 303 // if no exceptions return false 304 if ( nl_ex == 0p ) return false; 305 306 // otherwise loop and throwResume all pending exceptions 307 while ( nl_ex != 0p ){ 308 exception_t * ex = nl_ex->the_exception; 309 free( nl_ex ); 310 throwResume *ex; 311 nl_ex = pop_ehm_head( cor ); 312 } 313 314 return true; 315 } 316 317 bool poll() libcfa_public { return poll( active_coroutine() ); } 318 300 319 // user facing ehm operations 301 320 forall(T & | is_coroutine(T)) { … … 305 324 306 325 // poll for non-local exceptions 307 bool poll( T & cor ) libcfa_public { 308 coroutine$ * base_cor = get_coroutine( cor ); 309 nonlocal_exception * nl_ex = pop_ehm_head( base_cor ); 310 311 // if no exceptions return false 312 if ( nl_ex == 0p ) return false; 313 314 // otherwise loop and throwResume all pending exceptions 315 while ( nl_ex != 0p ){ 316 exception_t * ex = nl_ex->the_exception; 317 free( nl_ex ); 318 throwResume *ex; 319 nl_ex = pop_ehm_head( base_cor ); 320 } 321 322 return true; 323 } 326 bool poll( T & cor ) libcfa_public { return poll( get_coroutine( cor ) ); } 324 327 325 328 // poll iff nonlocal ehm is enabled -
libcfa/src/concurrency/coroutine.hfa
r27f2bef rc34bb1f 219 219 220 220 // non local ehm and coroutine utility routines 221 bool poll( coroutine$ * cor ); 222 bool poll(); 223 221 224 forall(T & | is_coroutine(T)) { 222 225 void enable_ehm( T & cor ); -
libcfa/src/concurrency/kernel/startup.cfa
r27f2bef rc34bb1f 487 487 last = 0p; 488 488 cancellation = 0p; 489 ehm_state.ehm_buffer{}; 490 ehm_state.buffer_lock{}; 491 ehm_state.ehm_enabled = false; 489 492 } 490 493
Note: See TracChangeset
for help on using the changeset viewer.