Skip to content

Sew future onto spawn-process #21

@ecpeterson

Description

@ecpeterson

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions