Does Racket support multithreading? -
i want write multithreading program in racket utilizes multiple processes shared memory space pthread in c. racket provides "thread", uses 1 process execute multiple threads. provides "subprocess" executing new programs via command line runs on multiple processes, programs cannot share same memory space.
don't that.
racket provide parallelism via futures , places, not provide (unrestricted) shared memory spaces. if want send data 1 thread another, use place channel.
as greg hendershott points out, can send shared vector via place channel, provides shared space use. (but that's not same thing sharing memory references, familiar with, say, java-style threading might expect. , latter "don't that" refers to.)
if want use pthread-like threading, guile provide them, won't using racket more. ;-)
Comments
Post a Comment