From 7a52a2250df6657c25a7030bed5a219b5ca99d05 Mon Sep 17 00:00:00 2001 From: Dmitry Pankov Date: Thu, 9 Nov 2023 16:54:09 +0300 Subject: [PATCH] Update docs for 'fiber:join' method --- doc/reference/reference_lua/fiber.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/reference/reference_lua/fiber.rst b/doc/reference/reference_lua/fiber.rst index 4a954b3180..e1b31126a4 100644 --- a/doc/reference/reference_lua/fiber.rst +++ b/doc/reference/reference_lua/fiber.rst @@ -1320,7 +1320,7 @@ API reference .. _fiber_object-join: - .. method:: join() + .. method:: join([timeout]) Join a fiber. Joining a fiber enables you to get the result returned by the fiber's function. @@ -1334,6 +1334,7 @@ API reference :ref:`fiber.new() ` and is made joinable using :ref:`fiber_object:set_joinable() `. + :param number timeout: maximum number of seconds to wait for the completion of the fiber. Default: infinity. :return: The ``join`` method returns two values: @@ -1350,6 +1351,8 @@ API reference :rtype: boolean + result type, or boolean + struct error + Possible errors: the fiber is already joined by concurrent ``fiber:join()``. + **Example:** The example below shows how to get the result returned by the fiber's function.