Can this thread pool recursively add tasks? #72
Replies: 1 comment
|
In short, yes: But it's a bit more complicated than that. You can easily do things incorrectly this way. The thread pool tries to ensure that it doesn't get stuck, but it's still possible to block as mentioned here: #57 (comment) Also in the future, please open a discussion for questions instead of an issue. |
0 replies
Answer selected by
ptsouchlos
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In short, yes:
https://github.com/DeveloperPaul123/thread-pool/blob/f14f97d84d2b861b710564ce712275ca43acad60/test/source/thread_pool.cpp#L317-L374
But it's a bit more complicated than that. You can easily do things incorrectly this way. The thread pool tries to ensure that it doesn't get stuck, but it's still possible to block as mentioned here: #57 (comment)
Also in the future, please open a discussion for questions instead of an issue.