-
-
Notifications
You must be signed in to change notification settings - Fork 31
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: pool.recycleWorkers()
method
#63
Conversation
AriPerkkio
commented
Jun 30, 2023
- Closes Feature: task level isolation #62
15f9c65
to
89df201
Compare
@sheremet-va could you test if this fixes your PR on Vitest's side? I quickly tested this with my reproduction case from vitest-dev/vitest#3659 and it seems to work nicely. No perf issues noticable. // always run environments isolated between each other
for (const env of envs) {
+ if (envs.indexOf(env) !== 0)
+ await pool.recycleWorkers() |
Shouldn't it always recycle? There is a possibility that some tests were running in multithreaded, so there are already some workers running (if you have a workspace project with We also need a test for this. I think we already do, but looks like it's not correct |
89df201
to
ddb3fed
Compare
My reproduction case was simple enough that it did not create conflicts there. But sure, it's OK to set pool to recycle when ever needed. It's not that slow to create new set of workers. |
pool.recycleWorkers()
method
Can confirm that tests in vitest-dev/vitest#3491 are passing |
|
47f22c8
to
992b957
Compare
992b957
to
0fa1fec
Compare