Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 592 Bytes

README.md

File metadata and controls

17 lines (11 loc) · 592 Bytes

DelayedScheduler

A class for scheduling tasks to run at a specified time in future. It demonstrates the use of multi-threading, priority queue and synchronization.

INPUTS:

  1. A Runnable object that is to be scheduled for delayed run
  2. A timestamp in future (in milliseconds) when the task is to be run

OUTPUTS:

  1. No immediate return. The specified task is scheduled.
  2. The task is executed at (or prtty close to) the specified time.

Possible improvements that can be made:

  1. Use a thread-pool for running the specified tasks instead of creating a new one everytime.