Skip to content

Commit

Permalink
Clarify resolution and failure values
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Nov 29, 2017
1 parent 2443b33 commit afa726d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lib/Mutex.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ interface Mutex {
/**
* Acquires a lock on the mutex.
*
* @return \Amp\Promise<\Amp\Sync\Lock> Resolves with a lock object with an ID of 0 when the acquire is successful.
* @return \Amp\Promise<\Amp\Sync\Lock> Resolves with a lock object with an ID of 0. May fail with a SyncException
* if an error occurs when attempting to obtain the lock (e.g. a shared memory segment closed).
*/
public function acquire(): Promise;
}
6 changes: 3 additions & 3 deletions lib/Semaphore.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ interface Semaphore {
/**
* Acquires a lock on the semaphore.
*
* @return \Amp\Promise<\Amp\Sync\Lock> Resolves with an integer keyed lock object when the acquire is
* successful. Identifiers returned by the locks should be 0-indexed. Releasing an idenifier MUST make that same
* identifier available.
* @return \Amp\Promise<\Amp\Sync\Lock> Resolves with an integer keyed lock object. Identifiers returned by the
* locks should be 0-indexed. Releasing an identifier MUST make that same identifier available. May fail with
* a SyncException if an error occurs when attempting to obtain the lock (e.g. a shared memory segment closed).
*/
public function acquire(): Promise;
}

0 comments on commit afa726d

Please sign in to comment.