Well its not only a for a file system. I've met a lot of areas in which I've been seeing this develop for e.g. access to the database, there could only be one connection. thus when the server is trying to access the database for one client, and at that point in time it is being accessed by another client, then it has to wait until that connection is freed up since you could only have one connection to the database. I get the part with the event handler. However, I still don't get exactly how to have that object in the server wait until either the file is freed up or the database is freed up.

The only thing with your solution idea is that I don't want the client to know what is happening. If their message to access a file or database has to wait, then that should be handled at the server level. I want all of that to be hidden from the clients.

I was thinking of an event handler structure. But I want something so that for e.g. the database, when the database connection is freed up, it triggers some kind of event that will cause any waiting transactions to go ahead. Again I'm a little fuzzy about the idea cause I don't know how to have these transactions wait except for some kind of while loop or a timer thread. This is such a common problem in a multi threaded environment that I believe there has to be a more efficient solution.