Hi all,
I have a problem I'm not sure how to solve.
I have an application that will spawn multiple worker threads (non thread-pool) that needs to know when jobs are added to a queue in SQL server 2005. Now the neat solution would be to use AutoResetEvents when the data is updated. The problem is the data is updated from a completely different application (out of process code).
If I use a polling mechanism things are going to get hairy. I cannot have several threads polling the DB at the same time I guess it will just kill the DB. What can I do here? Anyone have any advice? Would I need to have one thread polling the DB and signalling the threads that want to know? Problem is that gets complicated. Can I somehow signal the threads from an outside process. Problem is the code is not .NET so COM interop is the only way (ah, nightmare)
Is there any other way I can do this kind of polling in a CPU friendly way? Is there a wait mechanism available that I have missed?
TIA
Richard
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).