forked from vircadia/vircadia-native-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The build system uses a class called Singleton to handle file locking. This class has a few potential issues: 1) An instance of Single could delete a file owned by another instance 2) Calling `print` in `__enter__` doesn't write to STDOUT 3) If the lock file already exists but the process that "owned" it died without deleting it every process will be locked This change is an attempt to resolve these issues and provide some lock debugging code. The code is structured to default to using the current Singleton class unless the USE_FLOCK_CLS environmental variable is set. In the event the environment variable is set the Singleton class is replaced with FLock. The FLock class is designed to work while running on a machine that's also using the real Singleton class. It does this at the expense of not solving issue number #1. If FLock is proven successful and completely deployed to the cluster it should be made the default and the code that deletes the lock file in `__exit__` should be removed.
- Loading branch information
Matt Hardcastle
committed
May 8, 2019
1 parent
3877a35
commit 0ddfd6f
Showing
1 changed file
with
116 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters