---
name: "Perl::Critic::Policy::Community::Threads"
section: "3pm"
platform: "linux"
package: "libperl-critic-community-perl"
version: "1.0.4-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Perl::Critic::Policy::Community::Threads"
---

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

Interpreter-based threads are officially discouraged

## NAME

Perl::Critic::Policy::Community::Threads - Interpreter-based threads are officially discouraged

## DESCRIPTION

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.

## AUTHOR

Dan Book, `"dbook@cpan.org"`

## COPYRIGHT AND LICENSE

Copyright 2015, Dan Book.

This library is free software; you may redistribute it and/or modify it under the terms of the Artistic License version 2.0.

## SEE ALSO

Perl::Critic
