Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Close uv_idle handles when we're done with them (JuliaLang#39268)
uv_idle handles are a bit dangerous because the essentially prevent the uv loop from going to sleep, so if there's no work to be done on the julia side, it just turns into a busy loop. We start such an idle callback in the threads.jl test. We make sure it goes out of scope, so the GC will eventually close it, but in the meantime they keep the loop spinning. Now, unfortunately, the next test in line is the Distributed test, which runs everything in a subprocess, so it never builds up enough memory pressure to actually run the GC, so the idle handles never get closed. This isn't too big a deal, as the worst thing that happens is that it hogs one CPU core on CI while the threads test is running, but we don't have enough parallelism there anyway, so I don't expect a meaningful impact on CI. It does however blow up our rr traces and apparently causes significantly problems when trying to replay them on pernosco. This is easy to fix by just closing these handles once we're done with them.
- Loading branch information