Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

Addressing synchronization issues in InMemoryStorage class with the f… #95

Open
wants to merge 31 commits into
base: dev
Choose a base branch
from

Conversation

mike-kaufman
Copy link

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.

dougbu and others added 30 commits November 4, 2015 08:54
- also remove incorrect `-beta` versions for ASP.NET packages from `project.json` file
Getting the broker through RequestServices instead of ApplicationServ…
Appending html to PostContent rather than set
Initial commit of SystemWeb project structure
…it was there was no way of manual controlling things if you wanted to
…ollowing 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.
@mike-kaufman
Copy link
Author

@avanderhoorn, @nikmd23 - this is waiting on your review/feedback. Let me know if you have questions/comments/suggestions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants