If you mean multiple processor cores, then the most common approach is to use Places .
Locations allow the development of parallel programs that take advantage of machines with multiple processors, cores, or hardware threads.
Location is a parallel task that is actually a separate instance of the Racket virtual machine. Places exchange place channels, which are the endpoints for two-way buffered communications.
You may be able to use another parallelization technique, Futures , but the conditions for its operation are relatively limited, for example, floating point operations, as described here .
EDIT : in response to the comment:
Is there an implementation of a parallel card somewhere somewhere?
First, I have to make a backup. You may not need a place. You can get concurrency using Racket streams. For example, here map/thread :
#lang racket (define (map/thread f xs) ;; Make one channel for each element of xs. (define cs (for/list ([x xs]) (make-channel))) ;; Make one thread for each elemnet of xs. ;; Each thread calls (fx) and puts the result to its channel. (for ([x xs] [c cs]) (thread (thunk (channel-put c (fx))))) ;; Get the result from each channel. ;; Note: This will block on each channel if not yet ready. (for/list ([c cs]) (channel-get c))) ;; Use: (define xs '(1 2 3 4 5)) (map add1 xs) (map/thread add1 xs)
If the work in progress involves blocking, for example. I / O requests, this will give you "parallelism" in the sense that you are not stuck on I / O. However, Racket threads are green threads, so only one will use the CPU at a time.
If you really need parallel use of multiple processor cores, you will need futures or places.
Due to the fact that Places are implemented - effectively, like several instances of Racket, I do not immediately see how to write a common map/place . For examples of using seats using the "custom" method, see: