Unix.chdir and Sys.getcwd are currently used to normalize file paths, but the stateful chdir becomes a major reason why bantorra is not thread-safe. It's possible to normalize file paths without chdir, but the code would be too ugly. Thankfully, OCaml 4.13 will bring in a real Unix.realpath that does the job. I believe with some locking the entire library can be made thread-safe. For these reasons we should switch to OCaml 4.13 as soon as it is officially released.
Unix.chdir
andSys.getcwd
are currently used to normalize file paths, but the statefulchdir
becomes a major reason why bantorra is not thread-safe. It's possible to normalize file paths withoutchdir
, but the code would be too ugly. Thankfully, OCaml 4.13 will bring in a realUnix.realpath
that does the job. I believe with some locking the entire library can be made thread-safe. For these reasons we should switch to OCaml 4.13 as soon as it is officially released.