3b12c79eac26dd2ab9e20c448b09dbc5919ac8b7
port-channel
port-channel wraps a Racket input or output port as an asynchronous channel-like object.
Input port-channels run a reader thread that reads serialized Racket values from the port,
deserializes complete values and publishes them on an internal async channel. The
port-channel itself is a synchronizable event, so (sync pc) returns the next complete value.
Output port-channels expose port-channel-put, which queues a value immediately. A writer thread
serializes and flushes queued values to the underlying output port.
Values are encoded with racket/serialize. Custom structs must be declared with
serializable-struct.
Languages
Racket
100%