c# - Increase thread priority on wait handles -


I am running an application with a lot of threads. All these threads are updating the database with GPS coordinates. In the meantime, applications can get a synchronization request. The server must finish its work before processing this request. So I'm using an array of handles waiting to manage it.

Here's the scenario:

Actor:

  1 Writing Synchro thread N Thread  

N The thread is working at the Wait handles stop in a sync thread. It claims to lock, by doing so, it is put on the end of the list of the "lock thread claim".

The problem is this: this list can be very long, or my transit thread top priority .

How do I get it to give VIP pass ?

It seems that you should use the system. threading. Instead the reader lock slim instead. Author can work in the lock's 'Read' mode, enter the 'typed' mode in the sync thread that requires exclusive access.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -