Created
December 12, 2011 03:18
-
-
Save shirok/1464566 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
diff --git a/test/control.scm b/test/control.scm | |
index 4631c41..69e9d46 100644 | |
--- a/test/control.scm | |
+++ b/test/control.scm | |
@@ -49,9 +49,12 @@ | |
(cond-expand | |
[gauche.sys.pthreads | |
(test* "job-wait, job-kill" '(killed foo) | |
- (let* ([job (make-job (^[] (sys-sleep 10)) :waitable #t)] | |
+ (let* ([gate (make-mtqueue :max-length 0)] | |
+ [job (make-job (^[] (enqueue/wait! gate #t) (sys-sleep 10)) | |
+ :waitable #t)] | |
[t1 (thread-start! (make-thread (^[] (job-run! job))))] | |
[t2 (thread-start! (make-thread (^[] (job-wait job))))]) | |
+ (dequeue/wait! gate) | |
(job-mark-killed! job 'foo) | |
(list (thread-join! t2) (job-result job)))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment