in reply to Re^9: threads on Windows
in thread threads on Windows
I think I follow your arguments here and appreciate their content. By using a direct function call, I can maintain the same level of abstraction (even to the point of not modifying the format of my messages as they are today, if I so desired) without the added complexity and performance penalties that a separate minister thread would incur. If I needed some level of persistence (in this case, the thread and semaphore hashes), that could be created using module variables.
This raises a question for me about output. In this scenario, I can rationalize the use of an outbox queue since I have results coming in from multiple sources that then need to be pushed in some manner to the interface. However, I also see that my appreciation of the use of threaded tools is not yet mature (kid with a new toy). As I see it, it would be a good idea to keep the worker threads isolated to their tasks and use of a dispatch table would cause their threads of control to get caught up in the interface. Does this make sense, or am I missing the big picture again?
Thank you for your time, patience and wisdom for helping me on my pilgrimage toward enlightenment.
|
|---|