- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/coroutine.hfa
r1c01c58 r8fc9a5f 22 22 //----------------------------------------------------------------------------- 23 23 // Exception thrown from resume when a coroutine stack is cancelled. 24 // Should not have to be be sized (see trac #196). 25 FORALL_DATA_EXCEPTION(CoroutineCancelled, 26 (dtype coroutine_t | sized(coroutine_t)), (coroutine_t)) ( 24 FORALL_DATA_EXCEPTION(CoroutineCancelled, (dtype coroutine_t), (coroutine_t)) ( 27 25 coroutine_t * the_coroutine; 28 26 exception_t * the_exception; … … 30 28 31 29 forall(dtype T) 32 void mark_exception(CoroutineCancelled(T) *);33 34 forall(dtype T | sized(T))35 30 void copy(CoroutineCancelled(T) * dst, CoroutineCancelled(T) * src); 36 31 … … 42 37 // Anything that implements this trait can be resumed. 43 38 // Anything that is resumed is a coroutine. 44 trait is_coroutine(dtype T | sized(T) 45 | is_resumption_exception(CoroutineCancelled(T)) 46 | VTABLE_ASSERTION(CoroutineCancelled, (T))) { 39 trait is_coroutine(dtype T | IS_RESUMPTION_EXCEPTION(CoroutineCancelled, (T))) { 47 40 void main(T & this); 48 41 $coroutine * get_coroutine(T & this);
Note: See TracChangeset
for help on using the changeset viewer.