develooper Front page | perl.perl6.users | Postings from September 2017

Re: thread behavior

Thread Previous
From:
Brandon Allbery
Date:
September 4, 2017 10:37
Subject:
Re: thread behavior
Message ID:
CAKFCL4Vncco52qco5Ek=DximH8ZoSe_XvfQgZanvDibTsnzYOw@mail.gmail.com
On Mon, Sep 4, 2017 at 6:18 AM, Elizabeth Mattijsen <liz@dijkmat.nl> wrote:

> That can not be relied on in general, I’m afraid.  However, after some
> discussion, it appears that there is some support for an
> "is-initial-thread” method:
>
>    https://irclog.perlgeek.de/perl6-dev/2017-09-04#i_15112552
>
> Note that the feeling is that you shouldn’t write code that depends on
> this.
>

NativeCall users are likely to have a need for code that is guaranteed to
execute on the initial OS thread, and for specific C calls to always be
made on the same OS thread (both of these are related to thread-local
state; the former is often but not always such state initialized by
something not under the caller's control in the initial thread, often by a
shared object).

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About