https://github.com/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
https://github.com/jackfirth/racket-disposable
concurrency io racket-library
Last synced: 5 months ago
JSON representation
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
- Host: GitHub
- URL: https://github.com/jackfirth/racket-disposable
- Owner: jackfirth
- License: apache-2.0
- Created: 2017-06-20T23:27:22.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-11-24T00:46:12.000Z (about 1 year ago)
- Last Synced: 2025-08-23T22:20:33.172Z (5 months ago)
- Topics: concurrency, io, racket-library
- Language: Racket
- Homepage:
- Size: 179 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# racket-disposable [](https://travis-ci.org/jackfirth/racket-disposable) [](https://codecov.io/gh/jackfirth/racket-disposable) [](http://docs.racket-lang.org/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.
```racket
(require disposable)
(define (connect!) (make-connection ...))
(define (disconnect! conn) (close-connection conn ...))
(define disposable-connection (disposable connect! disconnect!))
(with-disposable ([conn disposable-connection])
... use conn ...)
```
Available from the [Racket package catalog](http://pkgs.racket-lang.org/). To install:
```bash
raco pkg install disposable
```