Re[23]: Жизнь внутри метода
От: deniok Россия  
Дата: 31.10.08 07:14
Оценка:
Здравствуйте, Pavel Dvorkin, Вы писали:


PD>И кстати, по твоей ссылке первая фраза


PD>On a multi-core processor, native thread implementations can assign work to multiple processors, whereas green thread implementations cannot.


В Хаскелле это не так. Там forkOS запускает поток OS, а forkIO — lightweight thread, причём

Just to clarify, forkOS is only necessary if you need to associate a Haskell thread with a particular OS thread. It is not necessary if you only need to make non-blocking foreign calls ... Neither is it necessary if you want to run threads in parallel on a multiprocessor: threads created with forkIO will be shared out amongst the running CPUs (using GHC, -threaded, and the +RTS -N runtime option).

 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.