[plt-scheme] horay(?) to me!

From: Eli Barzilay (eli at barzilay.org)
Date: Sun Jun 11 21:04:57 EDT 2006

On Jun 11, Mike wrote:
> Ok, so many people here have been doing this a long time.
> I'm starting to understand scheme, loops, and quasiquoting.
> For no practical purpose at all I submit the following.
> [...]

Could be turned into a stress test:

  (let loop1 ([m 5])
    (let loop2 ([ts '()])
      (printf ">>> level=~a, ~a threads\n" m (length ts))
      (if (< (length ts) m)
        (loop2 (cons (thread (lambda () (loop1 (sub1 m)))) ts))
        (for-each thread-wait ts))))

(Don't use higher values in the first line without having some tool
that can kill MzScheme available.)

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!

Posted on the users mailing list.