Skip to content

Commit

Permalink
Update docs for 'fiber:join' method (#3842)
Browse files Browse the repository at this point in the history
Co-authored-by: Dmitry Pankov <[email protected]>
  • Loading branch information
dima424658 and Dmitry Pankov authored Aug 15, 2024
1 parent 9e57f6c commit e85d720
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion doc/reference/reference_lua/fiber.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -1334,6 +1334,7 @@ API reference
:ref:`fiber.new() <fiber-new>` and is made joinable using
:ref:`fiber_object:set_joinable() <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:
Expand All @@ -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.
Expand Down

0 comments on commit e85d720

Please sign in to comment.