- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/thread.cfa
rac12f1f r3ea8ad1 82 82 T & thrd, void(*defaultResumptionHandler)(ThreadCancelled(T) &)) { 83 83 $monitor * m = get_monitor(thrd); 84 $thread * desc = get_thread(thrd); 85 86 // Setup the monitor guard 84 87 void (*dtor)(T& mutex this) = ^?{}; 85 88 bool join = defaultResumptionHandler != (void(*)(ThreadCancelled(T)&))0; 86 89 (this.mg){&m, (void(*)())dtor, join}; 87 90 91 92 /* paranoid */ verifyf( Halted == desc->state || Cancelled == desc->state, "Expected thread to be Halted or Cancelled, was %d\n", (int)desc->state ); 93 88 94 // After the guard set-up and any wait, check for cancellation. 89 $thread * desc = get_thread(thrd);90 95 struct _Unwind_Exception * cancellation = desc->self_cor.cancellation; 91 96 if ( likely( 0p == cancellation ) ) {
Note: See TracChangeset
for help on using the changeset viewer.