-
Notifications
You must be signed in to change notification settings - Fork 29.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
Creating a worker thread in the extension host crashes VS Code #88386
Comments
I noticed in profiles that this was actually a bottleneck for Jest tests (in #214) when running as a cluster. I wanted to use a worker thread for it, but it looks like there's an issue in vscode preventing that[1] for the moment. This cuts the time-to-first-breakpoint in half for the jest tests, which is fairly nice. The child process is killed after 30 seconds of inactivity. I may do an algorithmic optimization pass on the hash in the future. In particular, Node/V8 now has native bigint support, which is almost certainly faster than the `long` library. 1. microsoft/vscode#88386
Agreed, fails. Trying to use this in the |
Any updates on this? |
I have a feeling this does not reproduce with our exploration builds. Can you try? We are building exploration builds that use a much newer version of our UI framework (Electron version 8.x). I wonder if this issue reproduces with one of these builds, could you try? Download: |
@bpasero Tried and works (am to start a worker thread and things work as expected). |
This seems to be more of a debugging problem than actually being able to use worker threads. E.g. I created an extension that uses this and it seems to work fine unless I debug. |
FYI - It worked for me while debugging the extension. |
What I mean to say is: it works for me even in Electron 7. But not when debugging. |
Does this still crash with latest insiders ? |
Yep it seems to work in electron 9. (note that debugging the threads doesn't work either in Electron or in Node nodejs/node#26609) |
The worker_thread API is available, but attempting to use it in an extension crashes VS Code.
The text was updated successfully, but these errors were encountered: