An experimental Racket library providing an abstraction for values associated with external resources that allows automatic resource pooling, per-thread virtual construction, and monadic composition
A transient value is an allocated value of a disposable that may "come and go". More specifically:
Given a (disposable/c any), it's possible to construct a (disposable/c (transient/c any))
Given a transient, the underlying value may be acquired
A transient's allocated value may be explicitly disposed by the caller
A transient may be refreshed, which both disposes the transient's current underlying value and acquires a new value
The use case in mind is connections, particularly in protocols like HTTP/1.1 where a server's response may dictate that a connection must be closed. By wrapping a connection in a transient, connections may be both pooled and explicitly disposed and reallocated.
A transient value is an allocated value of a disposable that may "come and go". More specifically:
(disposable/c any)
, it's possible to construct a(disposable/c (transient/c any))
The use case in mind is connections, particularly in protocols like HTTP/1.1 where a server's response may dictate that a connection must be closed. By wrapping a connection in a transient, connections may be both pooled and explicitly disposed and reallocated.
Obsoletes #17