Closed LeonidVas closed 4 years ago
Updated
Now two implementations have been presented, and you need to choose one.
Leonid said that he met problems with approach with fiber.cancel(). The reason likely is caching of fiber conds (see compat.lua) and that waiters
field of struct fiber_cond
remains filled after canceling the fiber.
Let's stick with the original Leonid's variant.
Pushed two small fixups.
Squashed them (Leonid agreed).
We need to check of a session state before take a task after wait() because session maybe in disconnecting state and task will be hang in a take state after the session will be disconnected
Fixes #104