Changeset 9f1695b for src


Ignore:
Timestamp:
Mar 17, 2017, 10:46:48 AM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
17af7d1
Parents:
3743983
Message:

added destructor requirement to the is_thread trait

Location:
src/libcfa/concurrency
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/invoke.c

    r3743983 r9f1695b  
    5656
    5757void CtxInvokeThread(
     58      void (*dtor)(void *),
    5859      void (*main)(void *),
    5960      struct thread_desc *(*get_thread)(void *),
  • src/libcfa/concurrency/thread

    r3743983 r9f1695b  
    2828// Anything that is resumed is a coroutine.
    2929trait is_thread(dtype T) {
     30      void ^?{}(T* this);
    3031      void main(T* this);
    3132      thread_desc* get_thread(T* this);
     
    6465void ?{}( scoped(T)* this, P params );
    6566
    66 forall( dtype T | sized(T) | is_thread(T) | { void ^?{}(T*); } )
     67forall( dtype T | sized(T) | is_thread(T) )
    6768void ^?{}( scoped(T)* this );
    6869
  • src/libcfa/concurrency/thread.c

    r3743983 r9f1695b  
    6464}
    6565
    66 forall( dtype T | sized(T) | is_thread(T) | { void ^?{}(T*); } )
     66forall( dtype T | sized(T) | is_thread(T) )
    6767void ^?{}( scoped(T)* this ) {
    6868        stop(&this->handle);
Note: See TracChangeset for help on using the changeset viewer.