develooper Front page | perl.perl5.porters | Postings from December 2017

Re: [perl #96538] Closures returned from threads don't wrap aroundthe right lexicals

From:
Zefram
Date:
December 12, 2017 12:02
Subject:
Re: [perl #96538] Closures returned from threads don't wrap aroundthe right lexicals
Message ID:
20171212120224.GG25404@fysh.org
We can't possibly make this work as originally requested.  To preserve
object identity across thread creation and joining would require
maintaining the pointer table linking the threads, with the pointer table
owning refs to everything it knows about, which would prevent anything
from being freed in the parent thread.

The documentation about this was poor, though.  I've revised it in commit
27d3197f2b90b3534ea74a96fc7e37200baeb9b7, removing the obsolete caveats
about crashing and about subs generally not working, and adding some
discussion of the object identity issue raised in this ticket.

-zefram



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