Changeset 147a137
- Timestamp:
- Oct 1, 2023, 12:05:08 PM (14 months ago)
- Branches:
- master
- Children:
- fd775ae
- Parents:
- 1e7a765
- Location:
- libcfa/src/concurrency
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/coroutine.cfa
r1e7a765 r147a137 343 343 344 344 bool poll() libcfa_public { return poll( active_coroutine() ); } 345 void enable_ehm() libcfa_public { active_coroutine()->ehm_state.ehm_enabled = true; } 346 void disable_ehm() libcfa_public { active_coroutine()->ehm_state.ehm_enabled = false; } 347 bool checked_poll() libcfa_public { return active_coroutine()->ehm_state.ehm_enabled ? poll( active_coroutine() ) : false; } 345 348 coroutine$ * resumer() libcfa_public { return active_coroutine()->last; } 346 349 coroutine$ * first_resumer() libcfa_public { return active_coroutine()->starter; } -
libcfa/src/concurrency/coroutine.hfa
r1e7a765 r147a137 224 224 225 225 // non local ehm and coroutine utility routines 226 void enable_ehm(); 227 void disable_ehm(); 226 228 bool poll( coroutine$ * cor ); 227 229 bool poll(); 230 bool checked_poll(); 228 231 coroutine$ * resumer(); 229 232 coroutine$ * first_resumer(); 230 233 231 234 forall(T & | is_coroutine(T)) { 232 void enable_ehm( T & cor ); 233 void disable_ehm( T & cor ); 235 void enable_ehm( T & cor ); // enable checking non-local exceptions for cor via checked_poll 236 void disable_ehm( T & cor ); // disable checking non-local exceptions for cor via checked_poll 234 237 bool poll( T & cor ); 235 bool checked_poll( T & cor ); 238 bool checked_poll( T & cor ); // check for non-local exceptions while respecting enable/disable 236 239 coroutine$ * resumer( T & cor ); 237 240 coroutine$ * first_resumer( T & cor );
Note: See TracChangeset
for help on using the changeset viewer.