On 10/2/13 7:37 PM, Wojciech Meyer wrote:Just for the record, Parmap is fork-based, not thread-based.
Agreed here, but it does not preclude of using very lightweight
alternative based on system threads like parmap
> or functory for the
parts have a high degree of parallerism. (and of course only if your
program allows to do this)
On Tue, Oct 1, 2013 at 6:01 AM, Pierre Chambart<pierre.chambart@laposte.net <mailto:pierre.chambart@laposte.net>> wrote:
On 30/09/2013 05:18, Xavier Leroy wrote:
> On 2013-09-27 12:10, Tom Ridge wrote:
>> I have a little program which creates a thread, and then sits in
a loop:
>> [...]
>> When I run the program I get the output:
>>
>> 1
>> 2
>>
>> and the program then sits in the loop.
> It all depends on the whim of the OS scheduler. OCaml has no control
> over it. And you shoudn't expect any kind of fairness from the OS
> scheduler, esp. Linux's, which gladly jettisons any pretense of
> fairness in the hope of getting better throughput.
Usualy, the scheduler is fair when you force all threads to run on the
same processor.
But I would still prefer the LWT way for doing message passing.
--
Pierre
--
Caml-list mailing list. Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
--
Caml-list mailing list. Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs