fury-old
fury-old copied to clipboard
session counter is required for better isolation
Fury uses certain temporary resources (directories, names, etc) for compilation. Usually, there's only a single instance running at any time, so these can be reused between runs, but sometimes they need to be kept independent. A session identifier, synchronously allocated as the lowest unused natural number, should be appended to each of these resources so that multiple processes don't attempt to use the same resources at the same time.
What are those resources that cannot be shared between concurrent instances of Fury?
I think that anything related to the compilation can be shared, because concurrent sessions would use the same Bloop server anyway.
One example is the work directory that's used to output classfiles to before they're packaged into a JAR. This directory is currently named after the project, module and schema (though I've removed the schema from the name). If we have two watching builds running, we can't have those two processes moving files around in the same directory at the same time.
I've already done some work on this.
This should wait for the new task system.