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

webworkers keep running after clicking STOP #1

Closed
blonkm opened this issue Mar 6, 2022 · 1 comment
Closed

webworkers keep running after clicking STOP #1

blonkm opened this issue Mar 6, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@blonkm
Copy link
Owner

blonkm commented Mar 6, 2022

The webworkers in genetic.js have no way of stopping. The code has to finish all iterations.

I already tried to use close() and terminate(), but they don't seem to work.

it's possible to completely get rid of the webworkers, since they're not really necessary for this small problem.

Perhaps this can help: https://github.com/lodenrogue/genetic-algorithm-js

or https://github.com/panchishin/geneticalgorithm

@blonkm blonkm self-assigned this Mar 6, 2022
@blonkm blonkm added the bug Something isn't working label Mar 6, 2022
@blonkm
Copy link
Owner Author

blonkm commented Apr 19, 2023

Solution is to use setTimeout with a regular 'pause' so the worker can be interrupted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant