On this page:

5.13 Process-Wide and Place-Wide Registration🔗

The ffi/unsafe/global library provides a utility registering information that is local to a place or spans all places in the Racket process.

Added in version of package base.


(register-process-global key val)  cpointer?

  key : bytes?
  val : cpointer?
Gets or sets a value in a process-global table (i.e., shared across multiple places, if any).

If val is #f, the current mapping for key is reported.

If val is not #f, and no value has been installed for key, then the value is installed and #f is returned. If a value has already been installed, then no new value is installed and the old value is returned. The given val must not refer to garbage-collected memory.

This function is intended for infrequent use with a small number of keys.


(get-place-table)  hash?

Returns a place-specific, mutable, eq?-based hash table. The result is always the same for a particular place.

Added in version of package base.