Module Core_kernel.Hash_queue

A hash-queue is a combination of a queue and a hashtable that supports constant-time lookup and removal of queue elements in addition to the usual queue operations (enqueue, dequeue). The queue elements are key-value pairs. The hashtable has one entry for each element of the queue.

Calls to functions that would modify a hash-queue (e.g. enqueue, dequeue, remove, replace) detect if a client is in the middle of iterating over the queue (e.g., iter, fold, for_all, exists) and if so, raise an exception.

module type Key = Hashtbl.Key_plain

The key is used for the hashtable of queue elements.

module type S : sig ... end
module Make : functor (Key : Key) -> S with module Key = Key