Permalink
Browse files

dispatch waits by joining the dispatcher thread for the given ID (tha…

…nks to Hugo Arregui), release 0.5
  • Loading branch information...
1 parent 438d793 commit 527114ceeaf69e9be6ce0b8a43be850511bfba1a @bunny351 bunny351 committed May 3, 2013
Showing with 4 additions and 5 deletions.
  1. +2 −4 cncb.scm
  2. +1 −0 concurrent-native-callbacks.release-info
  3. +1 −1 concurrent-native-callbacks.setup
View
@@ -64,17 +64,15 @@
(define (dispatcher id)
(let ((box (list #f)))
- (define (dthread) (make-thread (cut dispatch-loop box)))
+ (define (dthread) (make-thread (cut dispatch-loop box) id))
(or (hash-table-ref/default dispatcher-table id #f)
(let ((disp (create-dispatcher id (dthread))))
(set-car! box disp)
(thread-start! (dispatcher-thread disp))
disp))))
(define (dispatch #!optional (id 'default))
- (let-values (((in1 out1) (create-pipe))
- ((in2 out2) (create-pipe)))
- (dispatch-loop (list (make-dispatcher id (current-thread) '() in1 out1 in2 out2)))))
+ (thread-join! (dispatcher-thread (dispatcher id))))
(define (dispatcher-add! disp name cb)
(dispatcher-callbacks-set!
@@ -4,3 +4,4 @@
(release "0.2")
(release "0.3")
(release "0.4")
+(release "0.5")
@@ -8,4 +8,4 @@
"concurrent-native-callbacks.import.so"
"concurrent-native-callbacks-compile-time.so"
"concurrent-native-callbacks-compile-time.import.so")
- '((version 0.4)))
+ '((version 0.5)))

0 comments on commit 527114c

Please sign in to comment.