http://www.perlmonks.org?node_id=1202877


in reply to Multi-thread friendly object life-time handling for XS modules

You could probably fix it on the perl side by dropping a shared ref into the object and testing that in DESTROY.

my $OB = bless { piggy => shared_clone([]) }; my $T = async { }; say threads::shared::_refcnt($OB->{piggy}); $T->join; say threads::shared::_refcnt($OB->{piggy});

  • Comment on Re: Multi-thread friendly object life-time handling for XS modules
  • Download Code