The use of threads is as described by others.
Linking to pthread means your perl is built with the -pthread flag. This has a subtle but important effect. This means that when you run perl, libc data that maintains state for the threads is initialized. This means that if your perl calls dlopen () in a library that has threads, it will work correctly, not hang.
PS. I am actually the one who wrote and passed the PTHREAD parameter to the port. I really discovered some perl modules that dlopen () 'd stream libs and caused perl to hang. I thought why. Trust me, you want to enable the PTHREAD option. I am really thinking of removing an option to disable it. See the FreeBSD PR Section 163512 and 163878 for more information. We should probably push this option upstream so that Perl uses this by default in FreeBSD. Anything that dlopen () can call should really be built with -pthread.
Steve wills
source share