You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, Akka.TestKit relies on a BlockingQueue internally inside TestState 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 the TestKitBase class, it blocks as it waits for a message to get queued into the BlockingQueue<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:
Wrap InternalTryReceiveOne() inside an async function that uses Task.Run() to spin it in another thread.
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
The text was updated successfully, but these errors were encountered: