New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to "soft" terminate #197
Comments
There is an internal-ish API |
That would certainly work for my uses... |
@halorgium any suggestions on what a test case for this might look like? I have no idea how to write async tests yet :) |
so @tarcieri @halorgium I know how to write a test for this with hilarious global variables and timers, but...seems very wrong. |
So just documenting this. Here are the features I see:
What else? |
@knewter Sounds good to me. Any additional functionality/service that I can think of can likely be achieved with existing mechanisms such as linking. |
@tbuehlmann could you perhaps provide some ideas based on our discussion today? |
Hmm. Well, @knewter's feature set looks good. That's how I would want it, too. |
@tbuehlmann perfect. |
Looking forward to this feature. Any particular estimate as to when it will be completed? |
I don't think it's actively being developed, and the semantics are somewhat involved |
@tarcieri Is the spec @knewter wrote not specific enough? I was hoping that @halorgium and @tbuehlmann indicated that development was underway but perhaps that isn't the case. |
That spec is unfortunately nowhere close to comprehensive enough, and unfortunately, the terminology it uses doesn't match Celluloid's terminology, so it's hard to understand exactly what he's describing. The main problem is "what is a job?" There are two things that need to be considered to know when an actor is "done":
Unfortunately there are any number of things which can go wrong which will leave actors in a half-completed state, especially with this feature. An actor's mailbox may be empty, for example, but it has outstanding tasks waiting on messages. Given how much trouble we've had trying to get the existing termination semantics correct, I'm pretty worried about implementing this feature at all. I think a better approach might be to look into something like Akka's "dead letter mailbox" |
I see. Thank you for the clarification and point towards Akka's method. On Apr 4, 2013, at 5:06 PM, Tony Arcieri notifications@github.com wrote:
|
@tboyko you should be able to push the semantics of what you need into your own app. I will attempt to scrounge the example which @tbuehlmann worked with me on IRC. |
I'm already using actors with a singular exclusive method. My concern is to |
@tboyko I am suggesting that you track the outstanding requests in your code. |
And by "trigger the terminate", I mean call a method which you have implemented on top. |
It would be useful to be able to request that a cell terminate only once it is done with any work, whether that is pipelined or suspended methods. For instance:
Possible?
The text was updated successfully, but these errors were encountered: