A module could possibly be rewritten to utilize the new features in threaded Perl to increase performance in a threaded environment.
If you're using a module that's not thread-safe for some reason, you can protect yourself by using it from one, and only one thread at all. The core the threads manpage module provides the basic functions you need to write threaded programs.
So if you find yourself looking for mutexes, or thread priorities, it's time to step back a bit and think about what you want to do and how Perl can do it.
This model is particularly useful if the system running the program will distribute multiple threads across different processors.Not all modules that you might use are thread-safe, and you should always assume a module is unsafe unless the documentation says otherwise.This includes modules that are distributed as part of the core.It can also be useful in ray tracing or rendering engines, where the individual threads can pass on interim results to give the user visual feedback.The pipeline model divides up a task into a series of steps, and passes the results of one step on to the thread processing the next.Once the event has been passed on, the boss thread goes back to waiting for another event. While tasks aren't necessarily performed faster than with any other method, it tends to have the best user-response times.In the work crew model, several threads are created that do essentially the same thing to different pieces of data.They aren't POSIX threads, or Dec Threads, or Java's Green threads, or Win32 threads.There are similarities, and the broad concepts are the same, but if you start looking for implementation details you're going to be either disappointed or confused. This is not to say that Perl threads are completely different from everything that's ever come before--they're not.Perl's threading model owes a lot to other thread models, especially POSIX.Just as Perl is not C, though, Perl threads are not POSIX threads.