[M3devel] State of threads? pthreads not safe to use on some platforms?

Mika Nystrom mika at async.caltech.edu
Mon Apr 18 21:01:44 CEST 2011

If you have a copy, can you try the thread tester program on it?


=?utf-8?Q?Dragi=C5=A1a_Duri=C4=87?= writes:
>First implementation of pthreads for m3 was made for pm3 in December of =
>2004... To the best of my knowledge, it was correct. As long as  you do =
>not define correct like "repetitive behaviour of green threads". I used =
>it to run DC++ hub I wrote as a pet project for stress testign it. =
>Worked well.
>On Apr 18, 2011, at 8:37 PM, Mika Nystrom wrote:
>> I don't think the pthreads implementation has ever been 100% correct.
>> If it has, please let me know which CVS date to check out!!!  (I use a
>> PM3 that is almost ten years old simply because this stuff works and =
>> happy to work with ANYTHING newer that works.)
>> As far as user ("green") threads goes, I think they *may* be right if =
>> are careful not to link with -pthread.  This means you have to change =
>> (remove pthread_atfork) or your program won't link.
>> (Please don't call pthreads "Posix" threads on this list: I know it is
>> correct but it is confusing because Modula-3's user threads =
>> for Unix is called "POSIX"---i.e., as opposed to "WIN32".  Modula-3 =
>> predates IEEE/ISO standardization of threads so there was no confusion =
>> the time the name was introduced.)
>>    Mika
>> =3D?utf-8?Q?Dragi=3DC5=3DA1a_Duri=3DC4=3D87?=3D writes:
>>> But, what recent change when my now problematic platform is on =3D
>>> 5.8.6....?
>>> On Apr 17, 2011, at 8:13 PM, Tony Hosking wrote:
>>>> =3D20
>>>> On Apr 17, 2011, at 1:34 PM, Hendrik Boom wrote:
>>>> =3D20
>>>>> On Sun, Apr 17, 2011 at 12:43:16PM -0400, Tony Hosking wrote:
>>>>>> So the question is what has changed.
>>>>>> I know threads were functional and stable at one point.
>>>>> =3D20
>>>>> Was that back when they were green threads?
>>>> =3D20
>>>> User threads have historically been pretty stable, and I believe =
>still =3D
>>> are.
>>>> Similarly, our use of pthreads was stable at one point but there =
>have =3D
>>> been recent changes that appear to have degraded them.
>>>> =3D20
>>>>> Has our use of posix threads ever been stable?
>>>>> Are green threads still available?
>>>>> =3D20
>>>>> -- hendrik
>>>> =3D20

More information about the M3devel mailing list