Skip to content

Commit

Permalink
rename trySendMut to tryTake
Browse files Browse the repository at this point in the history
  • Loading branch information
planetis-m committed Aug 16, 2024
1 parent 0cea8b4 commit 9c8f69c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions threading/channels.nim
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ proc `=copy`*[T](dest: var Chan[T], src: Chan[T]) =
proc trySend*[T](c: Chan[T], src: sink Isolated[T]): bool {.inline.} =
## Tries to send the message `src` to the channel `c`.
##
## The memory of `src` be moved if possible.
## The memory of `src` will be moved if possible.
## Doesn't block waiting for space in the channel to become available.
## Instead returns after an attempt to send a message was made.
##
Expand All @@ -313,7 +313,7 @@ template trySend*[T](c: Chan[T], src: T): bool =
mixin isolate
trySend(c, isolate(src))

proc trySendMut*[T](c: Chan[T], src: var Isolated[T]): bool {.inline.} =
proc tryTake*[T](c: Chan[T], src: var Isolated[T]): bool {.inline.} =
## Tries to send the message `src` to the channel `c`.
##
## The memory of `src` is moved directly.
Expand Down

0 comments on commit 9c8f69c

Please sign in to comment.