I use threads (from 0 to 100) and it became interesting to me, is it possible to determine the core on which the thread will be executed? If so, is it even necessary? Can I just run 100 threads?

  • A simple stream will jump between the cores. In linux, you can define its "instant" location, via rdtscp . I doubt that PHP has access to rdtscp . But even if it is organized, what will this knowledge give you? - mega

1 answer 1

I do not know if this is implemented in php, but in principle (at least, if we talk about pthreads in Linux), all this is possible.

Read:

Do I need to set the kernel? I do not think that this may be relevant for problems solved in PCP.