Description
Related dev. issue(s): tarantool/tarantool#6455
Product: Tarantool
Since: 1.10.1 (since the fiber.join() had been introduced)
Audience/target: Tarantool users
Root document: https://www.tarantool.io/en/doc/latest/reference/reference_lua/fiber/#fiber-object-set-joinable
SME: @mkostoevr
Details
Now the document states the following:
Usually fiber_object:join() should be called, otherwise the fiber’s status may become ‘suspended’ when the fiber function ends, instead of ‘dead’.
It also should inform the user that some fiber resources will only be freed on the fiber join. On other words, setting a fiber joinable without actually joining it will lead to a memory leak (not big though, less than a kilobyte).
My proposal:
If a fiber is joinable, some of its resources aren't freed on the fiber death until it's joined, so calling fiber_object:join() on such a fiber is recommended. Also not joining a joinable fiber can switch its status to ‘suspended’ when the fiber function ends, instead of ‘dead’.