Changeset 2a301ff for libcfa/src/concurrency/coroutine.hfa
- Timestamp:
- Aug 31, 2023, 11:31:15 PM (2 years ago)
- Branches:
- master
- Children:
- 950c58e
- Parents:
- 92355883 (diff), 686912c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
libcfa/src/concurrency/coroutine.hfa (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/coroutine.hfa
r92355883 r2a301ff 19 19 #include "invoke.h" 20 20 #include "../exception.hfa" 21 22 //----------------------------------------------------------------------------- 23 // Type used to store and queue nonlocal exceptions on coroutines 24 struct nonlocal_exception { 25 exception_t * the_exception; 26 nonlocal_exception * next; 27 }; 28 static inline void ?{} ( nonlocal_exception & this, exception_t * ex ) with(this) { 29 the_exception = ex; 30 next = 0p; 31 } 32 33 static inline nonlocal_exception *& get_next( nonlocal_exception & this ) __attribute__((const)) { 34 return this.next; 35 } 21 36 22 37 //----------------------------------------------------------------------------- … … 203 218 } 204 219 220 // non local ehm and coroutine utility routines 221 bool poll( coroutine$ * cor ); 222 bool poll(); 223 coroutine$ * resumer(); 224 225 forall(T & | is_coroutine(T)) { 226 void enable_ehm( T & cor ); 227 void disable_ehm( T & cor ); 228 bool poll( T & cor ); 229 bool checked_poll( T & cor ); 230 coroutine$ * resumer( T & cor ); 231 } 232 233 // trait for exceptions able to be resumed at another coroutine 234 forall(exceptT *, T & | is_coroutine(T)) 235 trait ehm_resume_at { void $throwResume(exceptT &); }; 236 237 // general resumeAt 238 forall(exceptT *, T & | ehm_resume_at( exceptT, T )) 239 void resumeAt( T & receiver, exceptT & ex ); 240 241 // resumeAt for underlying coroutine$ type 242 forall(exceptT * | { void $throwResume(exceptT &); }) 243 void resumeAt( coroutine$ * receiver, exceptT & ex ); 244 205 245 // Local Variables: // 206 246 // mode: c //
Note:
See TracChangeset
for help on using the changeset viewer.