I\'m writing a special data structure that will be available in a .NET library and one of the features of this data structure is that is will be thread safe provided that only o
Could you not require the Read and Write methods take a thread or thread ID? Then you can just compare against the one that called it first, and if it doesn't match, throw an exception or return an error code, or ignore the request.
Otherwise, what you propose should work also. You need only compare the thread IDs.