I want to create some distributed mutual exception using a database table. It would be nice to have the following interface in a stored procedure:
Wait (UniqueIdentifier)
I initially thought about this, having a table of unique identifiers. The procedure call will wait until a unique identifier is found in the table. However, I'm not sure how to make the calling thread wake up when the specified unique identifier has been removed from the table.
Any ideas? If the database is not suitable for this, are there any third-party tools that will work (preferably open source)?
(To avoid deadlocks, I either want to include a timeout in the wait operation, or SqlCommand has a timeout)
source
share