Skip to content
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

Sew future onto spawn-process #21

Open
ecpeterson opened this issue Nov 12, 2020 · 0 comments
Open

Sew future onto spawn-process #21

ecpeterson opened this issue Nov 12, 2020 · 0 comments

Comments

@ecpeterson
Copy link
Contributor

spawn-process presently (1) creates a process object and (2) registers it in the dereferencing table. This is a bit shy of what "spawn" means in other actor frameworks, where the generated process then automatically starts executing—in aether, one is expected to wrap spawn-process in future, otherwise the object doesn't get inserted in the simulation and passes to the garbage collector.

This is consistent with aether's style, but inconsistent with the general understanding of "spawn" and probably a source of bugs because of that. I don't think spawn-process is often used outside of d-p-u, in which case it could be rewritten as a d-p-u macro which includes the call to future, and the registration function could be separately exposed for the few times it is used. What I'm sure I don't want is for spawn-process to mean two different things in two different contexts. It would be unacceptable for it to need to be wrapped in future outside of d-p-u and to have future automatically injected in d-p-u.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant