Perl::Critic::Policy::Community::Threads(3pm)

Perl::Critic::Policy::Community::Threads3pm

Interpreter-based threads are officially discouraged

Overview

Perl interpreter threads are officially discouraged. They were created to emulate fork() in Windows environments, and are not fast or lightweight as one may expect. Non-blocking code or I/O can be easily parallelized by using an event loop such as POE, IO::Async, or Mojo::IOLoop. Blocking code is usually better parallelized by forking, which on Unix-like systems is fast and efficient. Modules such as forks and Parallel::Prefork can make forking easier to work with, as well as forking modules for event loops such as POE::Wheel::Run, IO::Async::Process, or "subprocess" in Mojo::IOLoop.

Affiliation

This policy is part of Perl::Critic::Community.

Configuration

This policy is not configurable except for the standard options.

Releases

2 releases since Debian 12 (Bookworm); the text changed 1 time.

  1. 12
  2. 13

Author

Dan Book, "[email protected]"

From libperl-critic-community-perl 1.0.4-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.