in reply to Problems using module Async

Hi, I wrote the multithreading using ithreads now. Everything seems to work great by now, but I have another question on ithreads:

A friend of mine told me that perl is only "simulating" threads so that every thread actually runs on the same processor core. I can't test that now, since I'm working on a single core machine (with only hyperthreading as its "second core"). But the intention is definitely to take advantage of a multi-core machine.

So is that true? Will there be no advantage running an ithreads code on a multi processor machine?

Replies are listed 'Best First'.
Re^2: Problems using module Async
by choroba (Cardinal) on Dec 10, 2015 at 12:25 UTC
    Your friend is wrong. You can show them the source if they need a proof.

    Update: The possible source of confusion is the fact that threads are used to emulate fork on MSWin.

    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
      Thanks for the quick answer (although I don't get what the code is actually doing at all, I trust you are right) :) I really was afraid that I need to write the whole thing once again, switching back to fork.