I have a game server that can accept requests from the user. User can request placement of items. The location method then spawns some asynchronous httpwebrequests (with timeouts) to find out if the placement is set correctly. I want a lock that will be locked when the server receives a hosting request and is unlocked by a web callback. I would use ReaderWriterLock, but this only works if I stay in the same thread and web request callbacks occur in different threads. Is there another lock I should use?
source share