Changeset 37907 in project


Ignore:
Timestamp:
09/25/19 17:33:15 (3 weeks ago)
Author:
felix winkelmann
Message:

tcp-server 1.4: keep thread-count properly (thanks to Henry Hu)

Location:
release/5/tcp-server
Files:
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • release/5/tcp-server/tags/1.4/tcp-server.scm

    r37611 r37907  
    7474    (define (thread-fork thunk)
    7575      (set! current-number-of-threads (add1 current-number-of-threads))
    76       (thread-start! (make-thread thunk))
    77       (set! current-number-of-threads (sub1 current-number-of-threads)) )
     76      (thread-start!
     77        (make-thread
     78          (lambda ()
     79            (thunk)
     80            (set! current-number-of-threads
     81              (sub1 current-number-of-threads)) ))))
    7882    (define (dispatch-request in out)
    7983      (handle-exceptions ex
  • release/5/tcp-server/trunk/tcp-server.scm

    r37611 r37907  
    7474    (define (thread-fork thunk)
    7575      (set! current-number-of-threads (add1 current-number-of-threads))
    76       (thread-start! (make-thread thunk))
    77       (set! current-number-of-threads (sub1 current-number-of-threads)) )
     76      (thread-start!
     77        (make-thread
     78          (lambda ()
     79            (thunk)
     80            (set! current-number-of-threads
     81              (sub1 current-number-of-threads)) ))))
    7882    (define (dispatch-request in out)
    7983      (handle-exceptions ex
Note: See TracChangeset for help on using the changeset viewer.