Test2:...rrency(3perl)
π NAME π
okay so bestie, welcome to the Test2:...rrency(3perl) page from the Perl Programmers Reference Guide β¨ this is Test2::Manual::Concurrency β the documentation for concurrency support. that's the whole name section, she's short and sweet. π
π΄ FORKING π΄
πΈ Test2 πΈ
Test2 supports forking, periodt. but for forking to actually work you need to load Test2::IPC. no cap. π
πΈ Test::Builder πΈ
Test::Builder did not used to support forking, but now that it's based on Test2 it does. and Test2::IPC must be loaded just as with Test2, okay?
πΈ Test2::Suite πΈ
Test2::Suite tools should all work fine with true forking unless otherwise noted. pseudo-fork via threads (Windows and a few others) is not supported, but it may work. π
patches will be accepted to repair any pseudo-fork issues, but for these to be used or tested they must be requested. fork tests should not run on pseudo-fork systems unless they are requested with an environment var, or the AUTHOR_TESTING var. pseudo-fork is fragile, and we do not want to block install due to a pseudo-fork flaw. π«Ά
πΈ Test::SharedFork πΈ
Test::SharedFork is currently supported and maintained, though it's no longer necessary thanks to Test2::IPC β¨ if usage ever drops off then the module may be deprecated, but for now the policy is to not let it break. currently it simply loads Test2::IPC if it can, and falls back to the old methods on legacy installs.
πΈ Others πΈ
individual authors are free to support or not support forking as they see fit. iconic behaviour honestly. π
π§΅ THREADING π§΅
Note This only applies to ithreads. π§
π Test2 π
the core of Test2 supports threading so long as Test2::IPC is loaded. basic threading support (making sure events make it to the parent thread) is fully supported, and must not be broken. π₯
sometimes perl installs have broken threads (some 5.10 versions compiled on newer gcc's will segv by simply starting a thread). this is beyond Test2's control, and not solvable in Test2. that said we strive for basic threading support on perl 5.8.1+. πͺ
if Test2 fails for threads on any perl 5.8 or above, and it is reasonably possible for Test2 to work around the issue, it should. (patches and bug reports welcome). π
π Test::Builder π
Test::Builder has had thread support for a long time. with Test2 the mechanism for thread support was switched to Test2::IPC. Test::Builder should still support threads as much as it did before the switch to Test2. support includes auto-enabling thread support if threads is loaded before Test::Builder.
if there is a deviation between the new and old threading behavior then it is a bug (unless the old behavior itself can be classified as a bug). please report (or patch!) any such threading issues. π
π Test2::Suite π
tools in Test2::Suite have minimal threading support. most of these tools do not care/notice threading and simply work because Test2::IPC handles it. feel free to report any thread related bugs in Test2::Suite. be aware though that these tools are not legacy, and have no pre-existing thread support β we reserve the right to refuse adding thread support to them. π
π¦ Test2::Workflow π¦
Test2::Workflow has been merged into Test2::Suite, so it gets addressed by this policy.
Test2::Workflow has thread support, but you must ask for it. thread tests for Test2::Workflow do not even run without setting either the AUTHOR_TESTING env var, or the T2_DO_THREAD_TESTS env var.
to use threads with Test2::Workflow you must set the T2_WORKFLOW_USE_THREADS env var.
if you do rely on threads with Test2::Workflow and find a bug please report it, but it will be given an ultra-low priority. merging patches that fix threading issues will be given normal priority.
π SEE ALSO π
Test2βTest2itself.Test2::Suiteβ Initial tools built usingTest2.Test2::Manualβ Primary index of the manual.
π¦ SOURCE π¦
the source code repository for Test2-Manual can be found at https://github.com/Test-More/test-more/. go look, bestie. π
π«Ά MAINTAINERS π«Ά
Chad Granum <exodist@cpan.org>
βοΈ AUTHORS βοΈ
Chad Granum <exodist@cpan.org>
π COPYRIGHT π
copyright Chad Granum <exodist@cpan.org>.
this program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
see http://dev.perl.org/licenses/
okay bestie that's literally the whole page π
this was perl v5.44.0, dated 2026-10-17, and the page itself is Test2:...rrency(3perl) β slay β¨π
π¦ where this page comes from
- arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms