On 5/21/2018 12:00 PM, Piyush Katariya wrote:

    what if i dont wish to juggle between Threads and Places to
    leverage all CPU cores ?

Just use Thread abstraction.

Chez Scheme page says it can possible run on multi core, so I believe it must be possible for Racket 7 to do so ???

Not necessarily.   Chez uses kernel threads on most platforms, but it's threads don't have the same semantics as Racket's threads.  So far, I have heard nothing definitive about whether Chez-Racket will try to use Chez threads directly, or continue with the Racket user-space thread model.

You also should note the caution in Chez's documentation:

   /One restriction should be observed when one of multiple threads
   creates or loads compiled code, however, which is that only that
   thread or subsequently created children, or children of subsequently
   created children, etc., should run the code. This is because
   multiple-processor systems upon which threaded code may run might
   not guarantee that the data and instruction caches are synchronized
   across processors. /

I'm not familiar with the internals of Chez threads, but this wording makes me wonder.  It's possible that the initial program thread might be started on any core, but other threads it creates are restricted to running on the same core as the parent  [most OS allow doing this].  Forking another process may be the only way to (guarantee to) use multiple cores.

Also note that Chez's thread API provides no way to change thread affinity.


You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to