Closed txdv closed 10 years ago
What about the AsyncWatcher?
I didn't even know what it does... But looks like it does the same.
Could it be that the managed Async Send should have a lock in it? Because multiple other Contexts in different threads could access them at every single point?
The Notifier is an awesome tool to write thread safe communication classes. Imagine you have two loops in different threads and you want communicate between them.
For example, something as easy as this could be implemented in order to provide convenient communication between loops in different threads:
Still some locks there, but they are pretty much minimal and are needed if you want to share state between 2 threads.