Artur Bergman wrote:
> - 'exit' inside a thread silently terminates thread only
> what was the reasoning for this change?

Wow.  You missed a whole lot of discussion on this and other
changes to the 'threads' module on the Perl5 Porters and
Perl iThreads mailing lists.  I did not make these changes
in a vacuum, but with lots of input and recommendations from
others.  I strongly recommend that you review the
correspondences from June and July:
    http://www.nntp.perl.org/group/perl.perl5.porters
    http://www.nntp.perl.org/group/perl.ithreads

As to this specific change, it was started by the
observation that exiting from 'main' with threads running
produced a warning while exiting from a thread did not.
When this inconsistency was brought up and discussed, the
consensus of those weighing in on the issue was that exiting
a thread should exit the thread only and not the whole app,
and further that it should not produce a warning.  Again,
see the mailing list archive for the discussion.

> Secondly, you do realise that
>
>         if (thread->interp) {
>             dTHXa(thread->interp);
>             PL_psig_pend[signal]++;
>             PL_sig_pending = 1;
>         }
>
> is not threadsafe in anyway?

In what way is it not thread safe?  Do you have a fix for
whatever bug you think exists?  Have you looked at the test
suite?  How is it deficient?

> And that the entire notion of sending signals to a thread
> is dubious and not a portable concept

In what way is it dubious?  Again, it was discussed and
accepted by those weighing in.  Further, it works very well,
and I have released two new modules to CPAN that utilitize
this new feature:  Thread::Suspend and Thread::Cancel.

As to portability, it works under all systems tested: Win32,
Solaris, Cygwin, and more.  What are your specific issues
with it?

I am sorry that you were not aware of the discussions that
were going on.  Do you monitor the Perl iThreads mailing
list?  I'll endeavor to include it on all further 'threads'
discussion.

Reply via email to