Fix updating the thread-proc-vector in thread pools
This commit is contained in:
parent
a13098494d
commit
2446078657
1 changed files with 9 additions and 2 deletions
|
|
@ -269,7 +269,7 @@ from there, or #f if that would be an empty string."
|
|||
(sleep 1)
|
||||
(destructor/safe args)))))
|
||||
|
||||
(define (process channel args)
|
||||
(define (process thread-index channel args)
|
||||
(let loop ()
|
||||
(match (get-message channel)
|
||||
('destroy #f)
|
||||
|
|
@ -292,6 +292,9 @@ from there, or #f if that would be an empty string."
|
|||
internal-time-units-per-second)
|
||||
exn))
|
||||
(lambda ()
|
||||
(vector-set! thread-proc-vector
|
||||
thread-index
|
||||
proc)
|
||||
(with-exception-handler
|
||||
(lambda (exn)
|
||||
(let ((stack
|
||||
|
|
@ -319,6 +322,10 @@ from there, or #f if that would be an empty string."
|
|||
vals))))))
|
||||
#:unwind? #t)))
|
||||
|
||||
(vector-set! thread-proc-vector
|
||||
thread-index
|
||||
#f)
|
||||
|
||||
(put-message reply
|
||||
response)
|
||||
|
||||
|
|
@ -358,7 +365,7 @@ from there, or #f if that would be an empty string."
|
|||
"knots: thread-pool: internal exception: ~A\n" exn))
|
||||
(lambda ()
|
||||
(parameterize ((param args))
|
||||
(process channel args)))
|
||||
(process index channel args)))
|
||||
#:unwind? #t)))
|
||||
|
||||
(when thread-destructor
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue