<?xml version="1.0" encoding="windows-1252"?>
<node id="181723" title="Re: Status and usefulness of ithreads in 5.8.0" created="2002-07-15 05:32:40" updated="2005-07-18 08:27:50">
<type id="11">
note</type>
<author id="169744">
Abigail-II</author>
<data>
<field name="doctext">
&lt;ul&gt;
&lt;li&gt;"Thread" is a buzzword, &lt;code&gt;fork&lt;/code&gt; isn't. Of course,
    &lt;code&gt;fork&lt;/code&gt; has clocked over 30 years of mileage, while
    threads are the new kid on the block.
&lt;li&gt;Threads have been invented and reinvented. So we have kernel
    threads, green threads, posix threads, interpreter threads,
    etc. It's just like Java, it never works the same twice.
    &lt;code&gt;fork&lt;/code&gt; is just &lt;code&gt;fork&lt;/code&gt;, you just pull
    out your Stevens or other book from your bookshelf, and it
    just works reliably, with a clear and simple interface.
&lt;li&gt;Inferior OSses don't have &lt;code&gt;fork&lt;/code&gt;.
&lt;li&gt;Threads mangle each others variables by default, and you need
    to explicitely guard yourself against that from happening.
    (Note that just *looking* at a variable can mean Perl changes
    the variable under the hood - it's not a safe operation.)
    &lt;code&gt;fork&lt;/code&gt; is safe for your data, you need to explicitely
    share data (using shared memory for instance).
&lt;li&gt;Compared to a select() loop (as provided by for instance POE),
    threads give you underterministic behaviour, while a select loop
    gives you deterministic behaviour.
&lt;li&gt;Do you know which thread is going to handle a send signal? On any
    signal capable OS? I know when I &lt;code&gt;fork()&lt;/code&gt;.
&lt;/ul&gt;
</field>
<field name="root_node">
181655</field>
<field name="parent_node">
181655</field>
</data>
</node>
