aboutsummaryrefslogtreecommitdiff
path: root/src/lanes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lanes.cpp')
-rw-r--r--src/lanes.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lanes.cpp b/src/lanes.cpp
index 8b693c3..7196b72 100644
--- a/src/lanes.cpp
+++ b/src/lanes.cpp
@@ -308,7 +308,11 @@ LUAG_FUNC(lane_new)
308 lane->status = Lane::Running; 308 lane->status = Lane::Running;
309 } 309 }
310 // unblock the thread so that it can terminate gracefully 310 // unblock the thread so that it can terminate gracefully
311#ifndef __PROSPERO__
311 lane->ready.count_down(); 312 lane->ready.count_down();
313#else // __PROSPERO__
314 lane->ready.test_and_set();
315#endif // __PROSPERO__
312 } 316 }
313 } 317 }
314 318
@@ -366,7 +370,12 @@ LUAG_FUNC(lane_new)
366 void success() 370 void success()
367 { 371 {
368 prepareUserData(); 372 prepareUserData();
373 // unblock the thread so that it can terminate gracefully
374#ifndef __PROSPERO__
369 lane->ready.count_down(); 375 lane->ready.count_down();
376#else // __PROSPERO__
377 lane->ready.test_and_set();
378#endif // __PROSPERO__
370 lane = nullptr; 379 lane = nullptr;
371 } 380 }
372 } _onExit{ L_, _lane}; 381 } _onExit{ L_, _lane};