tarantool / tarantool/tarantool
ipc.queue
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 3.7k
- Forks
- 419
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 88
Description
Implement a queue for parallel execution of tasks.
Queue implementation can be based on fibers and channels.
The idea is that you have a queue worker function, and want this function to be applied to all queue tasks in parallel, and also want to be able to wait until all tasks have been handled.
The api looks like this:
queue.create(worker_function)
queue.put(task)
queue.put(task)
queue.join(timeout) -- waits until all tasks are executed or a timeout occurs.
Effect: worker function is run in parallel in multiple fibers, each fiber's function invocation getting its own task as an argument.
Join waits until all tasks are handled or timeout happens.
The queue should be reusable after join, i.e. you should be able to start putting new tasks in it after it.
Queue size should be dynamic (additional parameters suck).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no repository files or tests; first locate the existing fiber and channel facilities. Review the proposed queue.create, put, and join API, then determine how parallel workers, timeouts, reuse after join, and dynamic sizing should be validated. Done means the queue supports all listed behaviors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100