diff --git a/examples/threading/benchmarks/ctak.scm b/examples/threading/benchmarks/ctak.scm index 3f1515ae..67d4a6c7 100644 --- a/examples/threading/benchmarks/ctak.scm +++ b/examples/threading/benchmarks/ctak.scm @@ -1,6 +1,6 @@ ;;; CTAK -- A version of the TAK procedure that uses continuations. -(import (scheme base) (scheme read) (scheme write) (scheme time)) +(import (scheme base) (scheme read) (scheme write) (scheme time) (srfi 18)) (define (ctak x y z) (call-with-current-continuation @@ -35,7 +35,26 @@ (string-append name ":" s1 ":" s2 ":" s3 ":" s4) count (lambda () - (ctak (hide count input1) (hide count input2) (hide count input3))) + (thread-start! + (make-thread + (lambda () + (ctak (hide count input1) (hide count input2) (hide count input3))))) + (thread-start! + (make-thread + (lambda () + (ctak (hide count input1) (hide count input2) (hide count input3))))) + (thread-start! + (make-thread + (lambda () + (ctak (hide count input1) (hide count input2) (hide count input3))))) + (thread-start! + (make-thread + (lambda () + (ctak (hide count input1) (hide count input2) (hide count input3))))) + (ctak (hide count input1) (hide count input2) (hide count input3)) + + ;; TODO: thread-join + ) (lambda (result) (equal? result output))))) ;;; The following code is appended to all benchmarks. diff --git a/examples/threading/benchmarks/paraffins.scm b/examples/threading/benchmarks/paraffins.scm index 3602a208..1d6e0031 100644 --- a/examples/threading/benchmarks/paraffins.scm +++ b/examples/threading/benchmarks/paraffins.scm @@ -1,6 +1,6 @@ ;;; PARAFFINS -- Compute how many paraffins exist with N carbon atoms. -(import (scheme base) (scheme read) (scheme write) (scheme time)) +(import (scheme base) (scheme read) (scheme write) (scheme time) (srfi 18)) ;;; This benchmark uses the following R6RS procedures. @@ -186,7 +186,17 @@ (run-r7rs-benchmark (string-append name ":" s1 ":" s2) count - (lambda () (nb (hide count input1))) + (lambda () + #;(thread-start! + (make-thread + (lambda () + (nb (hide count input1))))) + (thread-start! + (make-thread + (lambda () + (nb (hide count input1))))) + (nb (hide count input1)) + ) (lambda (result) (= result output))))) ;;; The following code is appended to all benchmarks.