Ignore:
File:
1 edited

Legend:

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

    rac12f1f r3ea8ad1  
    8282                T & thrd, void(*defaultResumptionHandler)(ThreadCancelled(T) &)) {
    8383        $monitor * m = get_monitor(thrd);
     84        $thread * desc = get_thread(thrd);
     85
     86        // Setup the monitor guard
    8487        void (*dtor)(T& mutex this) = ^?{};
    8588        bool join = defaultResumptionHandler != (void(*)(ThreadCancelled(T)&))0;
    8689        (this.mg){&m, (void(*)())dtor, join};
    8790
     91
     92        /* paranoid */ verifyf( Halted == desc->state || Cancelled == desc->state, "Expected thread to be Halted or Cancelled, was %d\n", (int)desc->state );
     93
    8894        // After the guard set-up and any wait, check for cancellation.
    89         $thread * desc = get_thread(thrd);
    9095        struct _Unwind_Exception * cancellation = desc->self_cor.cancellation;
    9196        if ( likely( 0p == cancellation ) ) {
Note: See TracChangeset for help on using the changeset viewer.