PriorityQueue-based Scheduler

165 views
Skip to first unread message

Ron Shapiro

unread,
Sep 15, 2014, 10:30:19 AM9/15/14
to rxj...@googlegroups.com
I was experimenting with a Scheduler that allows callers to specify priorities for when actions should be executed. Not sure if this is something people are interested in getting into the official library or to keep as a standalone package. Nonetheless, I'd appreciate any feedback: https://github.com/ronshapiro/rxjava-priority-scheduler

Thanks,

Shixiong Zhu

unread,
Sep 16, 2014, 4:35:21 AM9/16/14
to Ron Shapiro, rxj...@googlegroups.com
A Scheduler.Worker should be a sequential Scheduler for executing actions on a single thread or event loop. But looks PriorityWorker in your codes will schedule Actions to multiple threads?

Best Regards,

Shixiong Zhu

Ron Shapiro

unread,
Sep 16, 2014, 5:00:19 PM9/16/14
to Shixiong Zhu, rxj...@googlegroups.com

Now, instead of the worker just submitting the action to the PriorityQueue and the Scheduler's ExecutorService looping infinitely, the worker submits to the queue and initiates the job to process the item from the queue.

Shixiong Zhu

unread,
Sep 18, 2014, 2:30:13 AM9/18/14
to Ron Shapiro, rxj...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages