jackfirth / racket-disposable

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
Apache License 2.0
7 stars 0 forks source link

Add lazy disposables #103

Open jackfirth opened 7 years ago

jackfirth commented 7 years ago

Should take a disposable and produce a (disposable/c promise?), where forcing the promise allocates the disposable value. Disposal should only deallocate the value if its been forced, and attempting to force the promise after deallocation is attempted should be an error (similar in spirit to how call/disposable adds a continuation barrier).