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 reply to Re: Multi-thread friendly object life-time handling for XS modules
by Anonymous Monk
in thread Multi-thread friendly object life-time handling for XS modules
by salva
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |