module Task:sig
..end
A task will be a set of events to watch, and a corresponding function to execute when one of the events is trigered.
The executed function may then return a list of new tasks to schedule.
type
('a, 'b)
task = {
|
priority : |
|
events : |
|
handler : |
The 'a
parameter is the type of priorities, 'b
will be a subset of possible
events.
typeevent =
[ `Delay of float
| `Exception of Unix.file_descr
| `Read of Unix.file_descr
| `Write of Unix.file_descr ]
val add : 'a Duppy.scheduler -> ('a, [< event ]) task -> unit