3 ms·
OK, so this isn't really {become, F}, this is {run, F}. The function F, is expected to return results and terminates, so it is no longer running (but, it could
by toast0 7y ago
OK, so this isn't really {become, F}, this is {run, F}.
The function F, is expected to return results and terminates, so it is no longer running (but, it could have spawned a process or otherwise changed the world state; Erlang is generous with respect to side effects)
I don't really understand the version number means in this case? You can only run functions with the same or greater versions than had previously been run?
I think you're somehow asking for this to be both synchronous, in the sense that the result of running the function is returned directly and asynchronous in that you'd like to be able to cancel it. If you want the return directly, I can't also have previously returned a cancellation id.
If you just want to run a function, and get the results back, that's not that hard; but before I write the code for that, I want to really be sure what you're asking for.
- ProfHewitt 7y agoWith respect to your question: "I don't really understand the version number means in this case?" An item can be booted only if its version number has not regressed in to prevent replay attacks. There are no cancellation ids in the Actor implementation, however a cancellation exception can be thrown when an activity is cancelled.