Perl extension for sharing data structures between threads