Skip to content

Commit

Permalink
clarification
Browse files Browse the repository at this point in the history
  • Loading branch information
Krastanov committed Aug 6, 2023
1 parent 66a418a commit a1abfbc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/src/guides/blockingandyielding.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,6 @@ As you can see `Resource` shares some properties with `ReentrantLock` and avails

`take!` and `unlock` are both implemented on top of the lower level `get`.

The `Base.lock` and `Base.unlock` are aliased to `ConcurrentSim.request` and `ConcurrentSim.release` respectively for semantic convenience when working with `Resource`.
The `Base.lock` and `Base.unlock` are aliased to `ConcurrentSim.request` and `ConcurrentSim.release` respectively for semantic convenience when working with `Resource`.

`unlock(::Resource)` is instantaneous so the `@yield` is not strictly necessary. Similarly for `put!(::Store)` if the store has infinite capacity.

0 comments on commit a1abfbc

Please sign in to comment.