Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Priority Queues #20

Open
7 tasks
sheharyarn opened this issue Aug 22, 2019 · 2 comments
Open
7 tasks

Priority Queues #20

sheharyarn opened this issue Aug 22, 2019 · 2 comments

Comments

@sheharyarn
Copy link
Owner

Related to #19.

  • Replace Erlang's :queue with a priority queue data structure
  • Update Mnesia Table definition
  • Auto-migrate on update
  • Update Que.add API to support options
  • Option validation
  • Tests
  • Docs and Readme
@sheharyarn
Copy link
Owner Author

@noizu Instead of writing a custom implementation of priority queue, we might consider using erlang's built-in :gb_trees or another lib that uses pairing heaps. One reason being we don't want to use atoms for each priority and instead use positive integers. We'll allow the users to use any integer in 0..10 as the priority for now, with the default being 5. We might change this range in the future.

The Que.add API should remain the same; priority and other future options should now be specified in the optional Keyword list opts as the third argument. It would look like:

Que.add(SomeWorker, args, priority: 1)

@noizu
Copy link

noizu commented Jul 13, 2022

Noted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants