Patterns on how to use Pool #227
Replies: 1 comment 1 reply
-
|
Yes, The reason it works this way is that a response only makes sense in the context of a request, and synchronous messaging is merely an abstraction over asynchronous messaging. As you may have noticed, Sure, this could be improved. The main challenge is ensuring consistent behavior for both sync and async messages sent to |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I was exploring the use of the Pool actor to create a worker pool for throttling requests to an external service. The pool size would effectively be my rate limit, and I intended for the actors exercising the pool to retry submitting requests when the pool is full, until a worker becomes available. However, I realized that the pool doesn't provide any feedback on whether it is full or not. The pool would forward the calls I would issue to an actor, but forward itself doesn't have a return value. This means that, from a caller, you will always receive a timeout error, whether the pool is full or the actor handling the message crashes. Afaik there is no way to distinguish between the two. Am I missing something or is this not an intended use case for the Pool actor?
Beta Was this translation helpful? Give feedback.
All reactions