From 2cbf4d8ad1f9540573bd8b74de85572d80d60874 Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Sun, 13 Sep 2020 08:38:37 -0500 Subject: [PATCH] Update documentation for thread/send and thread/receive. --- src/core/thread.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/core/thread.c b/src/core/thread.c index 44ad4b88..7a19c707 100644 --- a/src/core/thread.c +++ b/src/core/thread.c @@ -724,15 +724,18 @@ static const JanetReg threadlib_cfuns[] = { }, { "thread/send", cfun_thread_send, - JDOC("(thread/send thread msg)\n\n" - "Send a message to the thread. This will never block and returns thread immediately. " + JDOC("(thread/send thread msgi &opt timeout)\n\n" + "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.") }, { "thread/receive", cfun_thread_receive, 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 " - "no messages are received.") + "Get a message sent to this thread. If timeout (in seconds) is provided, an error " + "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,