In the previous post, I introduced my ExclusiveLock. In the typical TDD style, I ended up with a correct single-threaded implementation. However, as soon as I added parallelism and exception tracking to the basic integration test, I began hitting exceptions…
Building an async exclusive lock
The Monitor class is useful for establishing critical sections in your .NET code. However, this is of no use in asynchronous scenarios for at least two reasons: Monitor has thread affinity, meaning the same thread must acquire and release. Monitor…
MemoryChannel integration test
In a previous post, I discussed the concurrency issues with the initial MemoryChannel implementation and how unit tests were insufficient to uncover them. I came up with these basic requirements/invariants to guide my integration test design: Data from separately sent…
MemoryChannel and concurrency
In a previous post, I described MemoryChannel and how I used TDD to implement it. After the 25th commit, 20 unit tests later, I had a fully functional but single-threaded implementation. Simply by inspection, I knew that this code would…