Skip to content

Callback functions #63

@allain

Description

@allain

The use of callback functions when EventEmitters are readily available is problematic since there are limitations that are self imposed by using them.

  • Only one callback can be registered at a time since it's a simple variable.
  • If an error occurs during the processing of the callback, it can halt execution of the thing that's calling the callback, even through the failure of the callback should not directly impact the execution path. For ex: an error during onDisconnect in Worker will stop the "stop" event from ever going out. though technically all operations during the stop call could be done even if the callback had failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions