Arch::RunLimit(3pm)

๐Ÿ“ฆ version 0.5.2, in ubuntu jammy

โœจ Arch::RunLimit ๐Ÿ’…

okay so bestie, this is the Arch::RunLimit page from the Perl user-contributed docs (that's the 3pm manual, section three, Perl modules, iykyk). It's a whole class whose entire job is making sure you don't have like a million processes running at once. She's a bouncer. A very polite, very Perl bouncer. ๐ŸŽ€


๐ŸŒธ NAME ๐ŸŒธ

Arch::RunLimit โ€” a class to enforce a limit on the number of running processes. No cap, that's literally her whole thing. She counts your processes and she says "enough." ๐Ÿ‘‘


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

use Arch::RunLimit

my $limit = Arch::RunLimit->new(file => $limit_file);

die "run-limit exceeded" if $limit->exceeded;

see how easy that is?? make one, ask if she's exceeded, and if she is โ€” die. dramatic but effective. ๐Ÿ’€


๐Ÿ’– DESCRIPTION ๐Ÿ’–

Arch::RunLimit provides an easy way to enforce a limit on the number of concurrently running processes. That's it. That's the vibe. She's not doing your taxes, she's not managing your whole life, she is just keeping count and telling you when you've gone over. main character energy, minimal responsibility. periodt. โœจ


๐Ÿซถ METHODS ๐Ÿซถ

the following methods are available:

new, exceeded.

that's the whole roster. two icons. two legends. ๐Ÿ’…

โญ new %opts

create a new Arch::RunLimit object with the specified options:

  • file (mandatory) โ€” the file used to keep track of the number of processes. bestie you HAVE to give her this one, it's not optional, she needs somewhere to write down the count. no file, no object, no discussion. ๐Ÿ™ˆ
  • limit โ€” the maximum number of concurrently running processes. defaults to 5. so if you don't say anything, she's gonna let five run and then start side-eyeing the sixth. โœ‹
  • timeout โ€” the timeout after which a process is assumed to be terminated, in seconds. defaults to 1800 (that's 30 minutes, for the non-math girlies ๐Ÿงฎ). so if a process has been vibing in there longer than that, she assumes it's gone and stops counting it. ๐Ÿ•ฐ๏ธ

๐Ÿ’œ exceeded

return 1 if the number of concurrently running processes has been exceeded, 0 otherwise.

so like. 1 = we are SO over the limit. 0 = we're good, carry on, slay. binary queen. ๐ŸŒˆ


๐Ÿ˜ญ BUGS ๐Ÿ˜ญ

awaiting your reports. she's literally sitting there with her little inbox open, tapping her nails, waiting for you to tell her what's wrong. don't leave her on read. ๐Ÿ’Œ


๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

  • Mikhael Goikhman (migo@homemail.com--Perl-GPL/arch-perl--devel).
  • Enno Cramer (uebergeek@web.de--2003/arch-perl--devel).

two absolute legends built her, show some respect fr fr. ๐ŸŒธ


and that's the whole page, bestie!! this one shipped as part of perl v5.20.2, dated 2005-06-21 โ€” yes she's vintage, yes she still ate, we love an OG. mwah ๐Ÿ’–โœจ๐ŸŽ€

๐Ÿ“ฆ where this page comes from