Skip to content

Instantly share code, notes, and snippets.

@dyoo
Last active December 10, 2015 08:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dyoo/4411396 to your computer and use it in GitHub Desktop.
Save dyoo/4411396 to your computer and use it in GitHub Desktop.
Custodian example
#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