Original Post
Hello,
What is the best way of implementing 2 threads that alternatively operate (but never at the same time), by reducing the waiting time to a maximum?
I though about using a CCriticalSection object, but can't get it working consistently (and fast!). Ideally, when one thread is done with its task, the other thread should do its task. When that second thread is done, then the first thread should do some other task, etc.
It is important that both threads do not waste time, except for waiting for the other thread.
Thanks for any insight
What is the best way of implementing 2 threads that alternatively operate (but never at the same time), by reducing the waiting time to a maximum?
I though about using a CCriticalSection object, but can't get it working consistently (and fast!). Ideally, when one thread is done with its task, the other thread should do its task. When that second thread is done, then the first thread should do some other task, etc.
It is important that both threads do not waste time, except for waiting for the other thread.
Thanks for any insight