0

Usage Cases:

Thread A: Please remove me from the active thread pool, Mr. Scheduler.

Thread B: Mr. Scheduler, please add Thread A to the active thread pool, if he isn't there already

This is a fairly specific, and well-contained problem. Of course, I can use pthread's condition variables to do this - but they solve a more complex problem.

Was wondering if there was a more direct route available. For example, sigwait

1 Answers1

0

Thread A:

thread_t thread_a = mach_thread_self();
thread_suspend(thread_a);

Thread B:

thread_resume(thread_a);