Skip to content

Commit

Permalink
utubettl: fix slow take on busy utubes
Browse files Browse the repository at this point in the history
If some of the utubettl for tasks at the top of the queue were busy
most of the time, `take` would slow down for every other task.
This problem is fixed by creating a new space `space_ready`. It
contains first task with `READY` status from each utube.

This solution shows great results for the stated problem, with the cost
of slowing the `put` method (it is ~3 times slower). Thus, this workaround is
disabled by default. To enable it, user should set the `v2 = true` as an
option while creating the tube. As example:
```lua
local test_queue = queue.create_tube('test_queue', 'utubettl',
        {temporary = true, v2 = true})
```

Closes #228
  • Loading branch information
DerekBum committed May 8, 2024
1 parent 4f5acaa commit 26c25b1
Show file tree
Hide file tree
Showing 2 changed files with 443 additions and 173 deletions.
Loading

0 comments on commit 26c25b1

Please sign in to comment.