Closed Arkatufus closed 2 years ago
Please let me know if you want me to help. I need this feature more than anyone.
Will do, thanks for the offer.
All the code are done but can't really be tested until all of the unit tests are converted to the new async code
Right now,
Akka.TestKit
relies on aBlockingQueue
internally insideTestState
making all test to run async over sync, In order to support full asynchronous test operations, we will need to replace this with something that supports async operation better. The main goal of this spec is to invert all operations into sync over async instead.The biggest problem right now is the
InternalTryReceiveOne()
method in theTestKitBase
class, it blocks as it waits for a message to get queued into theBlockingQueue<T>
. This method gets called by virtually all akka test function that waits for one message or another. This method needs to be converted into an async method.Options:
InternalTryReceiveOne()
inside an async function that usesTask.Run()
to spin it in another thread.BlockingQueue<T>
implementation with a customSystem.Threading.Channels.Channel<T>
that supports async read and writeBlockingQueue<T>
implementation with AsyncExAsyncCollection
orAsyncProducerConsumerQueue