Lock-free Immutable ConcurrentQueue
Clash Royale CLAN TAG #URR8PPP .everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0; up vote 3 down vote favorite 1 Similar to the code review I posted last week for an agent-based immutable replacement for ConcurrentDictionary , I have also created an agent-based immutable replacement for ConcurrentQueue . This uses a MailboxProcessor and an immutable queue based on Okasaki's implementation in Purely Functional Data Structures with a few extra operations. I am particularly interested in understanding if there's any way I can combine the QueueAgent and the InternalQueueAgent into one type (without the mutual-recursion), and if there's any way to do the asynchronous Peek and Dequeue operations without the internal ImmutableQueue s for the PeekListeners and DequeueListeners . The idea behind those operations is to support a "yield until a message is available" behavior similar to an asynchronous Peek or Rece...