Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/thread.hfa

    r5456537 rfd54fef  
    3232};
    3333
    34 EHM_FORALL_EXCEPTION(ThreadCancelled, (thread_t &), (thread_t)) (
     34FORALL_DATA_EXCEPTION(ThreadCancelled, (thread_t &), (thread_t)) (
    3535        thread_t * the_thread;
    3636        exception_t * the_exception;
     
    4242forall(T &)
    4343const char * msg(ThreadCancelled(T) *);
     44
     45// define that satisfies the trait without using the thread keyword
     46#define DECL_THREAD(X) $thread* get_thread(X& this) __attribute__((const)) { return &this.__thrd; } void main(X& this)
    4447
    4548// Inline getters for threads/coroutines/monitors
     
    7982};
    8083
    81 forall( T & | is_thread(T) | IS_EXCEPTION(ThreadCancelled, (T))
    82     | { EHM_DEFAULT_VTABLE(ThreadCancelled, (T)); })
     84forall( T & | is_thread(T) | IS_EXCEPTION(ThreadCancelled, (T)) )
    8385void ?{}( thread_dtor_guard_t & this, T & thrd, void(*)(ThreadCancelled(T) &) );
    8486void ^?{}( thread_dtor_guard_t & this );
     
    126128//----------
    127129// join
    128 forall( T & | is_thread(T) | IS_RESUMPTION_EXCEPTION(ThreadCancelled, (T))
    129     | { EHM_DEFAULT_VTABLE(ThreadCancelled, (T)); })
     130forall( T & | is_thread(T) | IS_RESUMPTION_EXCEPTION(ThreadCancelled, (T)) )
    130131T & join( T & this );
    131132
Note: See TracChangeset for help on using the changeset viewer.