This looks to be a bug in Perl and may be related to this bug fix reported in perl585delta.pod:
in reply to Re^3: New Module Announcement: Object::InsideOut
in thread New Module Announcement: Object::InsideOut
Creating a new thread when weak references exist was buggy, and would often cause warnings at interpreter destruction time.
I'll investigate this further. Thanks.
After further investigation, I'm fairly sure this is a Perl bug. I could not reproduce the error you received under Cygwin or Solaris, but I did reproduce the warnings mentioned in the quote above. Further, 03-threads.t and 04-shared.t are nearly the same, and 04-shared.t successed for you. I can only recommend upgrading to Perl 5.8.7 if you can.
I'll make note of these sorts of issues in the bug section of the POD.
Remember: There's always one more bug.