mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-17 10:07:09 +00:00
fixes comments
This commit is contained in:
@@ -369,14 +369,14 @@ proc sendImpl(q: PRawChannel, typ: PNimType, msg: pointer, noBlock: bool): bool
|
||||
|
||||
when defined(gcDestructors):
|
||||
proc send*[TMsg](c: var Channel[TMsg], msg: sink TMsg) {.inline.} =
|
||||
## Sends a message to a thread. `msg` is deeply copied.
|
||||
## Sends a message to a thread.
|
||||
discard sendImpl(cast[PRawChannel](addr c), cast[PNimType](getTypeInfo(msg)), unsafeAddr(msg), false)
|
||||
wasMoved(msg)
|
||||
|
||||
proc trySend*[TMsg](c: var Channel[TMsg], msg: sink TMsg): bool {.inline.} =
|
||||
## Tries to send a message to a thread.
|
||||
##
|
||||
## `msg` is deeply copied. Doesn't block.
|
||||
## Doesn't block.
|
||||
##
|
||||
## Returns `false` if the message was not sent because number of pending items
|
||||
## in the channel exceeded `maxItems`.
|
||||
|
||||
Reference in New Issue
Block a user