[erlang-questions] File writing and odd behavior when unrelated IO activity occurs

Scott Lystig Fritchie fritchie@REDACTED
Thu Jul 16 22:53:41 CEST 2009


Rob Elsner <thatsnotright@REDACTED> wrote:

re> The issue I am seeing is that using the above process, if I delete a
re> file which has already been recorded, it causes the file:write
re> process to "hang" which causes my mailbox to fill up [...]

If you aren't using "erl +A n" where "n" is some number of I/O worker
threads, adding it may help if your bad behavior is that the entire VM
is blocked waiting for a single unlink.

If it's just a single Erlang process that's waiting for file:delete()
and receiving active socket data, then I'd try:

   * rename the file to something harmless
   * spawn a proc to unlink the harmless name

-Scott


More information about the erlang-questions mailing list