Last active
December 10, 2015 08:58
-
-
Save dyoo/4411396 to your computer and use it in GitHub Desktop.
Custodian example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(define cust (make-custodian)) | |
(parameterize ([current-custodian cust]) | |
(custodian-shutdown-all cust) | |
;; The following will fail, since the custodian has shut down: | |
(open-input-file "/usr/share/dict/words")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment