.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.13)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.ie \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. nr % 0
. rr F
.\}
.el \{\
. de IX
..
.\}
.\" ========================================================================
.\"
.IX Title "Test2::Manual::Concurrency 3"
.TH Test2::Manual::Concurrency 3 "2019-05-18" "perl v5.10.1" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
Test2::Manual::Concurrency \- Documentation for Concurrency support.
.SH "FORKING"
.IX Header "FORKING"
.SS "Test2"
.IX Subsection "Test2"
Test2 supports forking. For forking to work you need to load Test2::IPC.
.SS "Test::Builder"
.IX Subsection "Test::Builder"
Test::Builder Did not used to support forking, but now that it is based on
Test2 it does. Test2::IPC must be loaded just as with Test2.
.SS "Test2::Suite"
.IX Subsection "Test2::Suite"
Test2::Suite tools should all work fine with \fItrue\fR forking unless
otherwise noted. Pseudo-fork via threads (Windows and a few others) is not
supported, but may work.
.PP
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
\&\s-1AUTHOR_TESTING\s0 var. Pseudo-fork is fragile, and we do not want to block install
due to a pseudo-fork flaw.
.SS "Test::SharedFork"
.IX Subsection "Test::SharedFork"
Test::SharedFork is currently support and maintained, though it is 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.
.SS "Others"
.IX Subsection "Others"
Individual authors are free to support or not support forking as they see fit.
.SH "THREADING"
.IX Header "THREADING"
\&\fBNote\fR This only applies to ithreads.
.SS "Test2"
.IX Subsection "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.
.PP
Some times 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+.
.PP
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).
.SS "Test::Builder"
.IX Subsection "Test::Builder"
Test::Builder has had thread support for a long time. With Test2 the
mechanism for thread support was switched to Test2::IPC. Test2::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.
.PP
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.
.SS "Test2::Suite"
.IX Subsection "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.
.PP
\fITest2::Workflow\fR
.IX Subsection "Test2::Workflow"
.PP
Test2::Workflow has been merged into Test2::Suite, so it gets addressed
by this policy.
.PP
Test2::Workflow has thread support, but you must ask for it. Thread tests
for Test2::Workflow do not event run without setting either the \s-1AUTHOR_TESTING\s0
env var, or the T2_DO_THREAD_TESTS env var.
.PP
To use threads with Test2::Workflow you must set the T2_WORKFLOW_USE_THREADS
env var.
.PP
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.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
Test2 \- Test2 itself.
.PP
Test2::Suite \- Initial tools built using Test2.
.PP
Test2::Manual \- Primary index of the manual.
.SH "SOURCE"
.IX Header "SOURCE"
The source code repository for Test2\-Manual can be found at
\&\fIhttps://github.com/Test\-More/Test2\-Suite/\fR.
.SH "MAINTAINERS"
.IX Header "MAINTAINERS"
.IP "Chad Granum <exodist@cpan.org>" 4
.IX Item "Chad Granum <exodist@cpan.org>"
.SH "AUTHORS"
.IX Header "AUTHORS"
.PD 0
.IP "Chad Granum <exodist@cpan.org>" 4
.IX Item "Chad Granum <exodist@cpan.org>"
.PD
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2018 Chad Granum <exodist@cpan.org>.
.PP
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
.PP
See \fIhttp://dev.perl.org/licenses/\fR
Copyright 2K16 - 2K18 Indonesian Hacker Rulez