Addressing synchronization issues reported in Issue #82 in InMemoryStorage class with the following changes:
added ReaderWriterLockSlim to control access to InMemoryStorage's dictionary & list that track individual RequestInfo instances
added ReaderWriterLockSlim to control access to each individual RequestAccess
removed RequestInfo's "Messages" accessor, and replaced it with a SnapshotMessages() method that will make a copy of the current set of messages. This is to avoid "collection has been modified" exceptions where the underlying set of messages is modified while a previous call is iterating over the list.
Made RequestIndices instances immutable.
added a bunch of asserts to validate assumptions about locking of resources.
added a test that was triggering the reported "collection modified" exceptions.
Please let me know if there's questions or feedback.
Addressing synchronization issues reported in Issue #82 in InMemoryStorage class with the following changes:
Please let me know if there's questions or feedback.