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

Browser worker are not terminated properly according to minSize, maxSize, timeToLive #2728

Open
schickling opened this issue May 11, 2024 · 0 comments · Fixed by #2819
Open
Labels
bug Something isn't working platform

Comments

@schickling
Copy link

What version of Effect is running?

3.1

What steps can reproduce the bug?

Set up a browser worker pool similar to this:

  const pool = yield* Worker.makePoolSerialized({
    minSize: 1,
    maxSize: Math.min(3, Math.ceil(navigator.hardwareConcurrency / 2)),
    timeToLive: Duration.seconds(10),
  })

What is the expected behavior?

The worker pool should gracefully shutting down and then terminating each worker until minSize is reached.

What do you see instead?

After more than 10 seconds, there are still the maxSize numbers of workers alive.

Additional information

No response

@schickling schickling added bug Something isn't working platform labels May 11, 2024
@tim-smart tim-smart linked a pull request May 22, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant