Skip to content

Commit

Permalink
Fix wording
Browse files Browse the repository at this point in the history
  • Loading branch information
groue committed Oct 7, 2022
1 parent 47865aa commit e67f3d2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -27,7 +27,7 @@ Task {
semaphore.signal()
```

An actor can use a semaphore in order to make its methods can't run concurrently:
An actor can use a semaphore so that its methods can't run concurrently, avoiding the "actor reentrancy problem":

```swift
actor MyActor {
Expand Down
3 changes: 2 additions & 1 deletion Sources/Semaphore/AsyncSemaphore.swift
Expand Up @@ -195,7 +195,8 @@ public final class AsyncSemaphore: @unchecked Sendable {
// the current task is cancelled), or call it later (if the task is
// cancelled later). In the first case, we're still holding the lock,
// waiting for the continuation. In the second case, we do not hold
// the This is the reason why we use a recursive lock.
// the lock. Being able to handle both situations is the reason why
// we use a recursive lock.
lock()
defer { unlock() }

Expand Down
2 changes: 1 addition & 1 deletion Sources/Semaphore/Documentation.docc/Documentation.md
Expand Up @@ -25,7 +25,7 @@ Task {
semaphore.signal()
```

An actor can use a semaphore in order to make its methods can't run concurrently:
An actor can use a semaphore so that its methods can't run concurrently, avoiding the "actor reentrancy problem":

```swift
actor MyActor {
Expand Down

0 comments on commit e67f3d2

Please sign in to comment.