Could you go ahead and elaborate a little bit on the alternative you have in mind, anyway?
Assuming this is addressed to me rather than the OP...
It is hard to say much more than I already did in my post above without a much clearer picture of what the OP's code does. The first thing I'd need is a description of why the OP is using threading? What benefits is s/he hoping to derive from their use? Is this an attempt to gain performance through the parallelisation of CPU-intensive code? Or allowing one part of the program to continue whilst another waits on IO?
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] |
I used threads to gain performance by allowing one part of the program to continue while another waits on IO.
| [reply] |
Sorry. But I'll need more than that to go on. A description of the basic structure of the application at least.
For example, what would the methods that you wish to call from the 'other' threads do to the state of the object? How does that relate to what that other thread is doing? etc.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] |
| [reply] |
| |