-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Worker.prototype.terminate panicked #4342
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to write a worker runner that run both in browser and deno. I terminate the worker with:
That's run well on deno 0.30 and before. But since 0.32, there is a counterfeit method here,
worker.terminate && typeof worker.terminate === 'function'
returns true now, but if you really to run it, it'll crash.On 0.32, a Error with 'Not yet implemented' thrown, we still can use try catch in program. But since 0.33, that change to a panic:
Now we cannot check whether we can this method trustworthy.
try{}
and catch something? nope!so we have to write code only for several version of deno.
feasible solutions
The text was updated successfully, but these errors were encountered: