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});
|
---|
In Section
Seekers of Perl Wisdom