lwt icon indicating copy to clipboard operation
lwt copied to clipboard

Async jobs are never killed

Open rixed opened this issue 6 years ago • 1 comments

I have a program using lwt that, at startup, perform a lot of Lwt_unix operations. Since they all happen in parallel and the default pool_size is 1000, hundredth of pthreads are created, the fast majority of which then sit idle for the rest of the program, looping in selects. This makes debugging/instrumenting/tracing that program more painful than it needs to be. Shouldn't idle pthreads be cancelled, for some value of idle?

rixed avatar May 04 '18 05:05 rixed

They probably should be. This came up in a prior issue as well. I can't find it now. We chose not to address the problem at that point, but it's worth looking into now.

aantron avatar May 04 '18 19:05 aantron