Skip to content

How can I make ‘Spawn’ return the error that occurred when 'Started' is received? #1105

@Capybara-1

Description

@Capybara-1

When I spawn an actor, if I need to initialize the actor upon receiving 'Started', and if initialization fails, the actor should not start successfully. How should I write this code? I noticed that after I receive 'Started', the spawn has already returned the Pid. However, I do not want this because I need the actor to stop when initialization fails and have the spawn return an error

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