From ad6a669381374b4091a42df71854b3eae24b6c11 Mon Sep 17 00:00:00 2001 From: Locria Cyber <74560659+locriacyber@users.noreply.github.com> Date: Wed, 14 Sep 2022 00:17:53 +0000 Subject: [PATCH] Add doc for ev/go Document that you can pass a function instead of a fiber to ev/go --- src/core/ev.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/ev.c b/src/core/ev.c index 84c631c4..d7747a97 100644 --- a/src/core/ev.c +++ b/src/core/ev.c @@ -2687,9 +2687,10 @@ error: /* C functions */ JANET_CORE_FN(cfun_ev_go, - "(ev/go fiber &opt value supervisor)", - "Put a fiber on the event loop to be resumed later. Optionally pass " - "a value to resume with, otherwise resumes with nil. Returns the fiber. " + "(ev/go fiber-or-fun &opt value supervisor)", + "Put a fiber on the event loop to be resumed later. If a function is used, it is wrapped" + "with `fiber/new` first. " + "Optionally pass a value to resume with, otherwise resumes with nil. Returns the fiber. " "An optional `core/channel` can be provided as a supervisor. When various " "events occur in the newly scheduled fiber, an event will be pushed to the supervisor. " "If not provided, the new fiber will inherit the current supervisor.") {