-
Notifications
You must be signed in to change notification settings - Fork 2
Description
I'm experiencing some problems when many hawk instances are created. You can recreate it by pipelining many hawk calls:
> hawk -e '[1..100]' | hawk -m 'P.replicate 10'
hawk: /tmp/3574191538758045375: removeLink: does not exist (No such file or directory)
note that not always the error is raised, but I saw that if I lock the part in which we interpret the expression, the error disappear. Probably two instances of hint will work on the same file (that uses a timestamp as filename I think) if the computer is very fast. If this is a hint bug, we should consider opening a bug report on hint.
I think there is a similar error on the configuration. Only one process should compile Prelude.hs, the others should wait for the result.
The locking part is a tricky one. POSIX should have lockable files, but this is not a portable solution. We need a library that abstract locks on files.
This is related to #43: with a centralized demon we could implement a queue system to avoid race conditions. Yet I think we should work with locks and avoid the daemon for now.