Provide a local (semaphore based) sync context and use it as the default (#480)

* Provide a local (semaphore based) sync context and use it as the default
* Use a ReentrantLock
* Update daemon/src/main/java/org/mvndaemon/mvnd/sync/MvndSyncContextFactory.java
Co-authored-by: Peter Palaga <ppalaga@redhat.com>
* Improve lock acquisition
Co-authored-by: Peter Palaga <ppalaga@redhat.com>
This commit is contained in:
Guillaume Nodet
2021-10-20 10:23:13 +02:00
committed by GitHub
parent 0a77ed06ba
commit 69c975fcd0
2 changed files with 74 additions and 1 deletions

View File

@@ -257,7 +257,7 @@ public enum Environment {
/**
* The SyncContextFactory to use (can be either 'noop' or 'ipc' for a server-wide factory).
*/
MVND_SYNC_CONTEXT_FACTORY("mvnd.syncContextFactory", null, "noop", OptionType.BOOLEAN, Flags.OPTIONAL);
MVND_SYNC_CONTEXT_FACTORY("mvnd.syncContextFactory", null, "local", OptionType.BOOLEAN, Flags.OPTIONAL);
static Properties properties;