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

feat: implement worker timeout #78

Merged
merged 3 commits into from
Jul 16, 2024

Commits on Jul 16, 2024

  1. feat: implement worker timeout

    This applies the timeout to both the initialization of the plugin and execution
    of plugin methods. We have to be a little careful about leaving `MessagePort`
    instances alive in Node.
    
    Additionally: accept manifest options in snakeCase and accept memory settings
    via plugin options.
    
    Fixes #74.
    chrisdickinson committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    7e7c114 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ee5d2d2 View commit details
    Browse the repository at this point in the history
  3. !squash bun workers don't deal with termination well

    It looks like the promise returned by `worker.terminate()` doesn't
    ref() properly in Bun. We can work around this by keeping a timer
    alive while we terminate the worker process.
    
    However, that reveals that Bun appears not to be able to handle
    halting Wasm execution in a thread. So -- for now, at least --
    disable timeouts in Bun.
    chrisdickinson committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    fd59d19 View commit details
    Browse the repository at this point in the history