Changeset c3b9d639 for libcfa/src/concurrency/coroutine.hfa
- Timestamp:
- May 26, 2022, 10:21:17 AM (19 months ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
- Children:
- 5416b44
- Parents:
- c715e5f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/coroutine.hfa
rc715e5f rc3b9d639 38 38 // Anything that implements this trait can be resumed. 39 39 // Anything that is resumed is a coroutine. 40 trait is_coroutine(T & | IS_RESUMPTION_EXCEPTION(CoroutineCancelled ,(T))) {40 trait is_coroutine(T & | IS_RESUMPTION_EXCEPTION(CoroutineCancelled(T))) { 41 41 void main(T & this); 42 42 coroutine$ * get_coroutine(T & this); … … 61 61 //----------------------------------------------------------------------------- 62 62 // Public coroutine API 63 forall(T & | is_coroutine(T) | { EHM_DEFAULT_VTABLE(CoroutineCancelled ,(T)); })63 forall(T & | is_coroutine(T) | { EHM_DEFAULT_VTABLE(CoroutineCancelled(T)); }) 64 64 void prime(T & cor); 65 65 … … 140 140 forall(T & | is_coroutine(T)) 141 141 void __cfaehm_cancelled_coroutine( 142 T & cor, coroutine$ * desc, EHM_DEFAULT_VTABLE(CoroutineCancelled ,(T)) );142 T & cor, coroutine$ * desc, EHM_DEFAULT_VTABLE(CoroutineCancelled(T)) ); 143 143 144 144 // Resume implementation inlined for performance 145 forall(T & | is_coroutine(T) | { EHM_DEFAULT_VTABLE(CoroutineCancelled ,(T)); })145 forall(T & | is_coroutine(T) | { EHM_DEFAULT_VTABLE(CoroutineCancelled(T)); }) 146 146 static inline T & resume(T & cor) { 147 147 // optimization : read TLS once and reuse it
Note: See TracChangeset
for help on using the changeset viewer.