Heater

POD

NAME

App::Heater - Raku-based Foot Warmer

SYNOPSIS

my $heater = App::Heater.new; $heater.heat;

DESCRIPTION

This program was written during a period of brutally cold weather, when the author was trying to figure out how to keep her feet warm. Since her computer is on the floor by her feet, and because she knows that the busier the CPU, the more heat generated, she wrote this module to load up the CPU.

CAVEATS

Obviously your electrical usage footprint (no pun intended) will increase if you run this program. That said, I believe this program is only slightly less efficient to turn your computer into a space heater than an actual space heater of the same wattage would be (I.E. energy used for "useful work" on the computer like sending signals to your monitor or lighting the power LED would not be turned into heat, while an electric space heater has even less of these "housekeeping" functions). In practice, I believe the energy difference to be negligable.

Only use this if your feet are cold!

USAGE

ATTRIBUTES

processes

$heater.processes = 3; say "Heating using " ~ $heater.processes;

Determines the number of "heater" threads to start. This defaults to the number of CPU cores in the machine, determined by $*KERNEL.cpu-cores.

METHODS

heat

$heater.heat;

This starts the heater. It will continue running until the process is killed, usually with a control-C character. When possible, the program will attempt to run "nicely," I.E. at a CPU priority below interactive programs, to not interfere with the overall performance of the machine.

start-heat-threads

$heater.start-heat-threads;

This starts the background heat threads. Note that it will not adjust the process CPU priority, and will immedaitely (or close to it) return, leaving the threads running in the background. Multiple calls will execute the heater threads multiple times.

AUTHOR

Joelle Maslak <[email protected]>

LEGAL

Licensed under the same terms as Raku.

Copyright Ā© 2021 by Joelle Maslak

App::Heater v0.1.0

Raku-based Foot Warmer

Authors

  • Joelle Maslak

License

Artistic-2.0

Dependencies

P5getpriority

Test Dependencies

Provides

  • App::Heater

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.