I have been trying to elegantly handle the case where an asynchronous worker thread produces both a result and (possibly) identifies more work that needs to be done. To think of it another way, if you are traversing a tree and doing work at each node, the worker is processing a node in the middle of the tree and has discovered child nodes that require work themselves.
Is it a reasonable design for the worker thread to add more jobs to the job queue? This would require the worker to know something about the concurrency system of which it is a part, which seems to violate some unwritten rule for me. How else has this problem been tackled?