module Netmcore_queue:sig..end
type ('e, 'h) squeue 
'e and the header has
      type 'htype ('e, 'h) squeue_descr 
exception Empty
val create : Netmcore.res_id -> 'h -> ('e, 'h) squeuecreate pool h: Creates an empty queue in the pool, with header
      hval push : 'e -> ('e, 'h) squeue -> unitpush x q: Pushes a copy of x to the end of the queue qval pop_p : ('e, 'h) squeue -> ('e -> 'a) -> 'apop_p q f: Takes the first element x from the queue, removes it
      there, and calls f x. During the execution of f the value x
      is pinned and cannot be garbage-collected.
      Raises Empty if the queue is empty.
val pop_c : ('e, 'h) squeue -> 'epop_c q: Takes the first element x from the queue, removes it
      there, and returns a copy of x in normal memory.
      Raises Empty if the queue is empty.
val top_p : ('e, 'h) squeue -> ('e -> 'a) -> 'apop_p q f: Takes the first element x of the queue, 
      and calls f x, without removing x from the queue. 
      During the execution of f the value x
      is pinned and cannot be garbage-collected.
      Raises Empty if the queue is empty.
val top_c : ('e, 'h) squeue -> 'epop_p q f: Takes the first element x of the queue, 
      and calls f x, without removing x from the queue. 
      Returns a copy of x in normal memory.
      Raises Empty if the queue is empty.
val clear : ('e, 'h) squeue -> unitval is_empty : ('e, 'h) squeue -> boolval length : ('e, 'h) squeue -> intval iter : ('e -> unit) -> ('e, 'h) squeue -> unititer f q: Iterates over the elements of the queue and calls f x
      for each element x. The function considers the list of elements
      at the time of calling iter as the list to iterate over. The
      queue is not locked during the iteration, and hence elements can be
      popped from the queue and pushed to the queue in parallel. The
      iteration does not take these modifications into account, though.
      The elements x are pinned during the execution of f and will
      not be garbage-collected, even if a parallel pop removes them from
      the queue.
val fold : ('a -> 'e -> 'a) -> 'a -> ('e, 'h) squeue -> 'afold f accu qval header : ('e, 'h) squeue -> 'hval heap : ('a, 'b) squeue -> Obj.t Netmcore_heap.heapval descr_of_squeue : ('e, 'h) squeue -> ('e, 'h) squeue_descrval squeue_of_descr : Netmcore.res_id ->
       ('e, 'h) squeue_descr -> ('e, 'h) squeue