tarantool / queue

Create task queues, add and take jobs, monitor failed tasks
Other
237 stars 52 forks source link

Add a check of the session state before take a task #108

Closed LeonidVas closed 4 years ago

LeonidVas commented 4 years ago

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

LeonidVas commented 4 years ago

Updated

LeonidVas commented 4 years ago

Now two implementations have been presented, and you need to choose one.

Totktonada commented 4 years ago

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.

Totktonada commented 4 years ago

Pushed two small fixups.

Totktonada commented 4 years ago

Squashed them (Leonid agreed).