-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CP-52039: Drop Semaphore from Xapi_stdext_threads (#6094)
Prior to version 4.12, OCaml's standard threads library (`systhreads`) had no builtin concept of a semaphore, so one was implemented in `Xapi_stdext_threads`. We replace all usages of this with `Semaphore.Counting` from the standard library and remove the implementation from `Xapi_stdext_threads`. Technically, the interface provided by the previous semaphore is more general: it permits arbitrary adjustments to the semaphore's counter, allowing for a "weighted" style of locking. However, this is only used in one place (with a weight value of 1, which is the same decrement/increment value as normal). --- All green on BVT+BST (`207043`) apart from 2 known issues. The number of users of the semaphore module in the codebase is quite low, which is why I think it's fine to drop the implementation entirely.
- Loading branch information
Showing
10 changed files
with
28 additions
and
111 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
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
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
57 changes: 0 additions & 57 deletions
57
ocaml/libs/xapi-stdext/lib/xapi-stdext-threads/semaphore.ml
This file was deleted.
Oops, something went wrong.
40 changes: 0 additions & 40 deletions
40
ocaml/libs/xapi-stdext/lib/xapi-stdext-threads/semaphore.mli
This file was deleted.
Oops, something went wrong.
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
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
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
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
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