mirror of
https://github.com/janet-lang/janet
synced 2025-07-05 11:32:54 +00:00
Update documentation for thread/send and thread/receive.
This commit is contained in:
parent
524c9b50d4
commit
2cbf4d8ad1
@ -724,15 +724,18 @@ static const JanetReg threadlib_cfuns[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"thread/send", cfun_thread_send,
|
"thread/send", cfun_thread_send,
|
||||||
JDOC("(thread/send thread msg)\n\n"
|
JDOC("(thread/send thread msgi &opt timeout)\n\n"
|
||||||
"Send a message to the thread. This will never block and returns thread immediately. "
|
"Send a message to the thread. By default, the timeout is 1 second, but an optional timeout "
|
||||||
|
"in seconds can be provided. Use math/inf for no timeout. "
|
||||||
"Will throw an error if there is a problem sending the message.")
|
"Will throw an error if there is a problem sending the message.")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"thread/receive", cfun_thread_receive,
|
"thread/receive", cfun_thread_receive,
|
||||||
JDOC("(thread/receive &opt timeout)\n\n"
|
JDOC("(thread/receive &opt timeout)\n\n"
|
||||||
"Get a message sent to this thread. If timeout is provided, an error will be thrown after the timeout has elapsed but "
|
"Get a message sent to this thread. If timeout (in seconds) is provided, an error "
|
||||||
"no messages are received.")
|
"will be thrown after the timeout has elapsed but "
|
||||||
|
"no messages are received. The default timeout is 1 second, and math/inf cam be passed to "
|
||||||
|
"turn off the timeout.")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"thread/close", cfun_thread_close,
|
"thread/close", cfun_thread_close,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user