Skip to content

Instantly share code, notes, and snippets.

@takikawa
Created March 11, 2013 18:58
Show Gist options
  • Save takikawa/5136708 to your computer and use it in GitHub Desktop.
Save takikawa/5136708 to your computer and use it in GitHub Desktop.
More TR thread & contract issues
#lang racket
(module a racket
(define f (λ () (displayln ((thread-receive) 'foo))))
(provide f))
(module b typed/racket
(require/typed (submod ".." a)
[f (-> Void)])
(define t (thread f))
(thread-send t (λ: ([x : Flonum]) (* x 5.3))))
(require 'b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment