You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The busy function is not implemented correctly. It is not returning whether or not the pool is busy, but if it is active. This was producing unexpected behaviour in my demo program, since work was threads were still working even after the job queue was empty.
The main problem is that there is no way to track when the threads are busy or not.
Whirlpool needs a wrapper class for the worker threads. It must store a bool to track if the thread is working or not. This would allow the ThreadPool class to verify if the threads are still working or not in the busy function.
Current busy implementation:
ThreadPool::busy() {
return active;
}
The text was updated successfully, but these errors were encountered:
The busy function is not implemented correctly. It is not returning whether or not the pool is busy, but if it is active. This was producing unexpected behaviour in my demo program, since work was threads were still working even after the job queue was empty.
The main problem is that there is no way to track when the threads are busy or not.
Whirlpool needs a wrapper class for the worker threads. It must store a bool to track if the thread is working or not. This would allow the ThreadPool class to verify if the threads are still working or not in the busy function.
Current busy implementation:
The text was updated successfully, but these errors were encountered: