Stop actor thread completely after timeout #202
Replies: 2 comments 1 reply
-
The future object doesn't have any special access to the running actor, so when you block on the future it just waits for a return value message to come across a message queue. Similarly, the running actor have no idea if there's anyone on the other end of the future waiting for a response, or if the consumer times out while waiting. I don't know exactly what you're trying to do, but what might help if you want to be able to stop the actor earlier on some condition is to split up
|
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply! |
Beta Was this translation helpful? Give feedback.
-
I was exploring pykka for one of my use cases in following manner:
Output:
Basically, I want to trigger AnActor's func method but if the execution time exceeds timeout, the thread must be stopped completely. Any exception in actor execution must be raised too.
In above example, timeout is happening but the program exit is not happening until the execution of actor is complete. Can such a use case be implemented through pykka?
Python v3.8.10
Pykka v3.1.1
Beta Was this translation helpful? Give feedback.
All reactions