Plasma GitLab Archive
Projects Blog Knowledge

Class Uq_engines.poll_engine

class poll_engine : ?extra_match:exn -> bool -> (Unixqueue.operation * float) list -> Unixqueue.event_system -> object .. end

This engine waits until one of the passed operations can be carried out, or until one of the operations times out. In these cases, the state of the engine changes to `Done ev, where ev is the corresponding event.

The argument list enumerates the operations to watch for. For every operation there may be a positive timeout value, or a negative number to indicate that no timeout is specified.

After one event has been caught, the engine terminates operation. The method restart can be called to activate it again (with the same event condition, and the same notification list). See the description of restart for possible problems.

extra_match : This function is called when an Extra event is found. If the function returns true for the argument exception of Extra, the event is caught; otherwise it is rejected.
Inherits

Additional methods

method restart : unit -> unit

Activate the engine again when it is already in a final state. This method violates the engine protocol, and should be used with care; it is not allowed to leave a final state.

The notification lists are kept, but note that observers often detach when final states are reached. This may cause problems.

method group : Unixqueue.group

Returns the group the engine is member of

This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml