[racket] Creating collections using Futures

From: Stees, Micheal T. (MSTEES at monmouthcollege.edu)
Date: Mon Jul 18 11:04:27 EDT 2011

I am trying to create a matrix like structure in parallel.  It was my intention to create each row of the matrix in parallel, and then simply combine them together using a list or some other collection.  My questions is this, the following code will create the structure that I am looking for, but it will not execute the creation of the two lists in parallel, am I doing something wrong here?

(define (buildRow row)
(build-list row (lambda (x) (random 10000000))))

(let ([f (future (lambda () (buildRow 5000)))])
  (list (buildRow 5000)
      (touch f)))


Posted on the users mailing list.