Skip to content

Commit

Permalink
Add some doc links
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippMDoerner committed Dec 15, 2023
1 parent ea741e7 commit cf2a7f6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions threading/channels.nim
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,9 @@ proc trySend*[T](c: Chan[T], src: sink Isolated[T]): bool {.inline.} =
## Instead returns after an attempt to send a message was made.
##
## .. warning:: Blocking is still possible if another thread uses the blocking
## version of `send`/`recv` and waits for the data/space to appear in the
## channel, thus holding the internal lock to channel's buffer.
## version of the `send proc`_ / `recv proc`_ and waits for the
## data/space to appear in the channel, thus holding the internal lock to
## channel's buffer.
##
## Returns `false` if the message was not sent because the number of pending
## messages in the channel exceeded its capacity.
Expand All @@ -298,8 +299,8 @@ proc tryRecv*[T](c: Chan[T], dst: var T): bool {.inline.} =
## Instead returns after an attempt to receive a message was made.
##
## .. warning:: Blocking is still possible if another thread uses the blocking
## version of `send`/`recv` and waits for the data/space to appear in the
## channel, thus holding the internal lock to channel's buffer.
## version of the `send proc`_ / `recv proc`_ and waits for the data/space to
## appear in the channel, thus holding the internal lock to channel's buffer.
##
## Returns `false` and does not change `dist` if no message was received.
channelReceive(c.d, dst.addr, sizeof(T), false)
Expand Down

0 comments on commit cf2a7f6

Please sign in to comment.