Multi-thread concurrency control

0

I need to develop a Windows Service with C # that checks a table in the database (Sql Server 2008). In this table you have the data I need and a Status field ( Ready,Processing, Processed, Error ).

The service will always get the first result with Status Ready , and as soon as it gets, it will update the status to Processing .

Now my question, what is the best way to control this, since I intend to use 4 concurrent threads.

How do I stop threads from getting a repeating value?

    
asked by anonymous 27.01.2017 / 16:33

0 answers