[erlang-bugs] efile_drv & async thread key
Fri Aug 16 01:23:45 CEST 2013
On Thu, Aug 15, 2013 at 9:34 AM, Patrik Nyblom <> wrote:
> Yes, one example is process exit, where close definitely should not be
> with other file operations from other threads that are ongoing. That
> definitely happens if
> you round robin the file descriptors.
Perhaps the close could be enqueued on the descriptor work queue but not
the async thread queue until any outstanding ops have finished, though it
like the descriptor currently keeps track of how many async ops are
> Yes, probably. It is not safe though, especially compressed files in
> combination with
> processes getting exit (kill) signals during the file operations may core
> the VM.
In our case, the file procs run forever, so I think our risk will be low on
system. I've enabled the behavior via an env var, so we won't be running
this on the
rest of our systems.
With better distribution of the FD's maybe you can get as good results as
> the round robin without risks?
Unfortunately not. The only way to ensure that there wouldn't a noticeable
in load between different async threads would be to either have far too
many or far
too few async threads.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-bugs