Subject: | Consider using Devel::GlobalDestruction for acurate and thread-safe GD detection |
You use a weird hack in [1] to detect post-factum global destruction
state. This is not only error prone, but it will not even work under
ithreads as described in [2]. Please consider switching to
https://metacpan.org/release/Devel-GlobalDestruction, which has both an
XS and a PurePerl variant, both of which are tested to behave correctly
under ithreads.
[1]
https://metacpan.org/source/MONS/AnyEvent-Worker-0.06/lib/AnyEvent/Worker.pm#L323
[2]
https://metacpan.org/source/RIBASUSHI/Devel-GlobalDestruction-0.09/lib/Devel/GlobalDestruction.pm#60