Name : perl-Acme-Urinal
| |
Version : 1.0
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : 4.64
| Date : 2024-08-05 19:01:06
|
Group : Development/Libraries/Perl
| Source RPM : perl-Acme-Urinal-1.0-4.64.src.rpm
|
Size : 0.03 MB
| |
Packager : (none)
| |
Summary : assign resources using the same algorithm used by men choosing which uri[cut]
|
Description :
When men use a bathroom with multiple urinals. The way the urinal to use is chosen is nearly deterministic. This module allocates resources in a way that emulates this process.
Basically, a Acme::Urinal object keeps track of a list of resources. You can then request these resources be allocated and used by asking for one using the pick_one method. It will return the next resource according to the algorithm. Once finished suing that resource, you may return it using the leave method.
Each resource is chosen according to the following rules:
* 1.
If possible, the lowest index resource that has a free resource on either side is chosen.
* 2.
Failing that, the lowest index resource with a lesser neighbor free is chosen.
* 3.
Failing that, the lowest index resource with a greater neighbor free is chosen.
* 4.
Failing that, the lowest index resource that is not at either end is chosen (because those end ones usually tend to be the less preferable low urinal).
* 5.
Finally, the lowest index resource that is available is chosen.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-A/openSUSE_Tumbleweed/noarch |