Module type StreamQueue.S
module Stm : Stream_intf.Smodule WeightFun : sig ... end
val length : t -> intNumber of elements
val is_empty : t -> boolcheck whether the queue is empty
val take_first : t -> Stm.C.t optionAttempts to take a clause out of the queue. Guarded recursion: can't loop forever @raises Not_found in the guard is reached
val take_fair_anyway : t -> Stm.C.t option listTakes clauses from the queue in a fair manner. Unguarded recursion, may loop forever
val take_stm_nb : t -> Stm.C.t option listAttempts to take as many clauses from the queue as there are streams in the queue. Calls take_first to do so and stops if its guard is reached
val take_stm_nb_fix_stm : t -> Stm.C.t option listAttempts to take as many clauses from the queue as there are streams in the queue. Extract as many clauses as possible from first stream before moving to a new stream to find more clauses if necessary
val name : t -> stringName of the implementation/role of the queue
Available Queues
val make : guard:int -> ratio:int -> weight:(Stm.t -> int) -> string -> tCreates a priority queue that uses
weightto sort streams.- parameter ratio
pick-given ratio. Only one in
ratiotruly returns a clause if there is one available in calls totake_first_when_availableandtake_fair_anyway.
- parameter name
the name of this stream queue
val default : unit -> tObtain the default queue