-
-
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.
- Loading branch information
1 parent
30e42fb
commit e51c085
Showing
32 changed files
with
1,730 additions
and
2,413 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { ERR_LOCK_OWNERSHIP } from "./constants"; | ||
import { LockError } from "./lockError"; | ||
|
||
/** | ||
* Represents an ownership error originating from a lock. | ||
*/ | ||
export class OwnershipError extends LockError { | ||
/** | ||
* @param message - An optional custom error message. | ||
*/ | ||
constructor(message?: string) { | ||
super(message ?? ERR_LOCK_OWNERSHIP); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { ERR_LOCK_RELOCK } from "./constants"; | ||
import { LockError } from "./lockError"; | ||
|
||
/** | ||
* Represents an error relocking a lock. | ||
*/ | ||
export class RelockError extends LockError { | ||
/** | ||
* @param message - An optional custom error message. | ||
*/ | ||
constructor(message?: string) { | ||
super(message ?? ERR_LOCK_RELOCK); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,31 @@ | ||
// Types | ||
export { BasicLockable } from "./types/basicLockable"; | ||
export type { BasicLockable } from "./types/basicLockable"; | ||
export { type CVStatus, CV_OK, CV_TIMED_OUT } from "./types/cvStatus"; | ||
export { Lockable } from "./types/lockable"; | ||
export { SharedLockable } from "./types/sharedLockable"; | ||
export { SharedTimedLockable } from "./types/sharedTimedLockable"; | ||
export { TimedLockable } from "./types/timedLockable"; | ||
export type { Lockable } from "./types/lockable"; | ||
export type { SharedLockable } from "./types/sharedLockable"; | ||
export type { SharedResource } from "./types/sharedResource"; | ||
export type { SharedTimedLockable } from "./types/sharedTimedLockable"; | ||
export type { TimedLockable } from "./types/timedLockable"; | ||
|
||
// Errors | ||
export { MutexError } from "./errors/mutexError"; | ||
export { MutexOwnershipError } from "./errors/mutexOwnershipError"; | ||
export { MutexRelockError } from "./errors/mutexRelockError"; | ||
export { LockError } from "./errors/lockError"; | ||
export { OwnershipError } from "./errors/ownershipError"; | ||
export { RelockError } from "./errors/relockError"; | ||
export { TimeoutError } from "./errors/timeoutError"; | ||
|
||
// Core | ||
// Mutex | ||
export { Mutex } from "./mutex/mutex"; | ||
export { RecursiveMutex } from "./mutex/recursiveMutex"; | ||
export { RecursiveTimedMutex } from "./mutex/recursiveTimedMutex"; | ||
export { SharedMutex } from "./mutex/sharedMutex"; | ||
export { TimedMutex } from "./mutex/timedMutex"; | ||
|
||
// Mutex Management | ||
export { lockGuard } from "./utils/lockGuard"; | ||
export { SharedLock } from "./utils/sharedLock"; | ||
|
||
// Condition Variables | ||
export { ConditionVariable } from "./conditionVariable"; | ||
export { Mutex } from "./mutex"; | ||
export { RecursiveMutex } from "./recursiveMutex"; | ||
export { Semaphore } from "./semaphore"; | ||
export { SharedMutex } from "./sharedMutex"; | ||
|
||
// Semaphores | ||
export { CountingSemaphore } from "./semaphore/countingSemaphore"; |
Oops, something went wrong.