queue-fix!

Synopsis

(queue-fix! queue)

Parameters

  • queue

Description

This procedure “fixes” the queue and thus protects it from being reclaimed by garbage collection when the interpreter has lost any reference. The purpose of this is that any background threads relying on the presence of this queue are not affected by garbage collection effects. There’s no way to “unfix” a queue from Scheme, the memory structures live as long as the Scheme interpreter is running.

Side Effects

The queue is exempted from garbage collection.

Return Value

unspecified (ok)

Example

> (define q (queue-create))
sl
> (queue-fix! q)
ok
> (queue-fixed? q)
#t
>