-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CA-323702: fcntl locks are per process, so need to reference count.
As fcntl locks are per-process it is not an error if a lock is acquired that is already held, however the release is not reference counted by the system. So, if a lock is taken by an API and subsequently another method in the call chain takes the same lock it must not be released until the API call completes. To ensure this behaviour make Lock objects unique by name and namespace so that subsequent calls obtain the same object reference. internally to the object track how many calls to acquire and release have been made and only release the underlying lock when all the acquires have had matching release calls. Signed-off-by: Mark Syms <mark.syms@citrix.com>
- Loading branch information
1 parent
00ad07c
commit d150e73
Showing
4 changed files
with
305 additions
and
96 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
Oops, something went wrong.