TEST2::MANUAL::ANATOMY::IPC(3perl)

πŸ’– Test2::Manual::Anatomy::IPC πŸ’–

okay bestie, welcome to Test2::Manual::Anatomy::IPC β€” the manual for the IPC system, and yes we are going to make inter-process communication sound as cute as it actually is (which is very). πŸŽ€


✨ DESCRIPTION ✨

This document describes the IPC system. that's it, that's the whole thing, but like... in detail. keep reading. πŸ¦‹


🌸 WHAT IS THE IPC SYSTEM 🌸

The IPC system is activated by loading Test2::IPC. no cap!!

Once you load it, your hubs become process/thread aware β€” iconic behavior honestly β€” and they will forward events along to the parent process/thread as necessary. it's giving teamwork. it's giving family. 🫢


πŸ’… HOW DOES THE IPC SYSTEM AFFECT EVERYTHING? πŸ’…

So Test2::API and Test2::API::Instance have some behaviors that trigger if Test2::IPC is loaded before the global state is initialized. mainly: an IPC driver will be initiated and stored in the global state. slay.

If an IPC driver is initialized then all hubs will be initialized with a reference to the driver instance. and if a hub has an IPC driver instance, bestie, it will use it to forward events to parent processes and threads. main character energy fr fr. πŸ‘‘


πŸ¦‹ WHAT DOES AN IPC DRIVER DO? πŸ¦‹

An Test2::IPC::Driver provides a way to send event data to a destination process+thread+hub (or to all globally, if you're feeling generous ✨). The driver must also provide a way for a process/thread/hub to read in any pending events that have been sent to it. sending without receiving is not the vibe. 😀


🌈 HOW DOES THE DEFAULT IPC DRIVER WORK? 🌈

The default IPC driver is Test2::IPC::Driver::Files. periodt.

This default driver, when initialized, starts by creating a temporary directory. Any time an event needs to be sent to another process/thread/hub, the event will be written to a file using Storable. The file is written with the destination process, thread, and hub as part of the filename. All hubs will regularly check for pending IPC events and will process them. mwah. πŸ’‹

This driver is further optimized using a small chunk of SHM. Any time a new event is sent via IPC the shm is updated to have a new value. Hubs will not bother checking for new IPC events unless the shm value has changed since their last poll. A result of this is that the IPC system is surprisingly fast, and does not waste time polling the hard drive when there are no pending events. no wasted energy, no wasted vibes, literally the dream. πŸ”₯


⭐ SEE ALSO ⭐

  • Test2::Manual β€” Primary index of the manual. go read it bestie, it's the hub of all knowledge 🧚

πŸ’œ SOURCE πŸ’œ

The source code repository for Test2-Manual can be found at https://github.com/Test-More/test-more/. go snoop, you're welcome πŸ’–


πŸ‘‘ MAINTAINERS πŸ‘‘

  • Chad Granum <exodist@cpan.org>

🌸 AUTHORS 🌸

  • Chad Granum <exodist@cpan.org>

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 so that's the whole anatomy lesson, and this blessed page came to you from perl v5.44.0 on 2026-10-17 β€” that's the Test2:...my::IPC(3perl) moment right there. stay hydrated, keep your hubs driver-aware, and go forward some events to your parent process. πŸ’…βœ¨πŸ“

πŸ“¦ 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