Summary
This chapter completes our survey of all three of the major techniques for handling concurrent stream-oriented connections. Each has advantages and disadvantages.
Multitasking using fork() is currently available only on UNIX and Win32 platforms (using Perl 5.6 or higher). It has more overhead than the other methods due to the necessity of launching a new process to deal with each connection, but programs written using the technique tend to be simple and reliable.
Multithreading is available on Win32 and many UNIX platforms and requires a version of Perl that is built with threading support. Threaded applications must be careful to lock and release shared variables and other resources, adding to the complexity of the code. We were able ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access