Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/threads

    r8def349 rbd98b58  
    2727// Anything that implements this trait can be resumed.
    2828// Anything that is resumed is a coroutine.
    29 trait is_thread(dtype T | sized(T)) {
     29trait is_thread(dtype T /*| sized(T)*/) {
    3030      void main(T* this);
    3131      thread_h* get_thread(T* this);
     32        /*void ?{}(T*);
     33        void ^?{}(T*);*/
    3234};
    3335
    3436#define DECL_THREAD(X) static inline thread_h* get_thread(X* this) { return &this->t; } void main(X* this);
    3537
    36 forall( dtype T | sized(T) | is_thread(T) )
     38forall(otype T | is_thread(T) )
    3739static inline coroutine* get_coroutine(T* this) {
    3840        return &get_thread(this)->c;
     
    5355// thread runner
    5456// Structure that actually start and stop threads
    55 forall( dtype T | sized(T) | is_thread(T) )
     57forall(otype T | is_thread(T) )
    5658struct thread {
    5759        T handle;
    5860};
    5961
    60 forall( dtype T | sized(T) | is_thread(T) | { void ?{}(T*); } )
     62forall(otype T | is_thread(T) )
    6163void ?{}( thread(T)* this );
    6264
    63 forall( dtype T, ttype P | sized(T) | is_thread(T) | { void ?{}(T*, P); } )
     65forall(otype T, ttype P | is_thread(T) | { void ?{}(T*, P); } )
    6466void ?{}( thread(T)* this, P params );
    6567
    66 forall( dtype T | sized(T) | is_thread(T) | { void ^?{}(T*); } )
     68forall(otype T | is_thread(T) )
    6769void ^?{}( thread(T)* this );
    6870
Note: See TracChangeset for help on using the changeset viewer.