Added the Thread type and related functions.

original commit: 15b0c8542d3a54a37539608623754109f96b4d3e
This commit is contained in:
Vincent St-Amour 2010-06-09 12:34:17 -04:00
parent ce236fdf46
commit d5c72476e8
3 changed files with 13 additions and 1 deletions

View File

@ -280,7 +280,17 @@
[fprintf (->* (list -Output-Port -String) Univ -Void)]
[format (->* (list -String) Univ -String)]
[sleep (N . -> . -Void)]
[thread (-> (-> Univ) -Thread)]
[thread? (make-pred-ty -Thread)]
[current-thread (-> -Thread)]
[thread/suspend-to-kill (-> (-> Univ) -Thread)]
[thread-suspend (-Thread . -> . -Void)]
[kill-thread (-Thread . -> . -Void)]
[break-thread (-Thread . -> . -Void)]
[sleep ([N] . ->opt . -Void)]
[thread-running? (-Thread . -> . B)]
[thread-dead? (-Thread . -> . B)]
[thread-wait (-Thread . -> . -Void)]
[reverse (-poly (a) (-> (-lst a) (-lst a)))]
[append (-poly (a) (->* (list) (-lst a) (-lst a)))]

View File

@ -35,6 +35,7 @@
[Identifier Ident]
[Procedure top-func]
[Keyword -Keyword]
[Thread -Thread]
[Listof -Listof]
[Vectorof (-poly (a) (make-Vector a))]
[FlVector -FlVector]

View File

@ -93,6 +93,7 @@
(define -String (make-Base 'String #'string?))
(define -Keyword (make-Base 'Keyword #'keyword?))
(define -Char (make-Base 'Char #'char?))
(define -Thread (make-Base 'Thread #'thread?))
(define -Prompt-Tag (make-Base 'Prompt-Tag #'continuation-prompt-tag?))
(define -Cont-Mark-Set (make-Base 'Continuation-Mark-Set #'continuation-mark-set?))
(define -Path (make-Base 'Path #'path?))