[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
Provides of semaphore semantics for restricting the number of workers that may be concurrently performing the same task. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
File Size: | 173 lines (6 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
PoolCounter_Stub:: (4 methods):
__construct()
acquireForMe()
acquireForAnyone()
release()
Class: PoolCounter_Stub - X-Ref
__construct() X-Ref |
No description |
acquireForMe() X-Ref |
No description |
acquireForAnyone() X-Ref |
No description |
release() X-Ref |
No description |
__construct( $conf, $type, $key ) X-Ref |
param: array $conf param: string $type param: string $key |
factory( $type, $key ) X-Ref |
Create a Pool counter. This should only be called from the PoolWorks. param: string $type param: string $key return: PoolCounter |
getKey() X-Ref |
return: string |
hashKeyIntoSlots( $key, $slots ) X-Ref |
Given a key (any string) and the number of lots, returns a slot number (an integer from the [0..($slots-1)] range). This is used for a global limit on the number of instances of a given type that can acquire a lock. The hashing is deterministic so that PoolCounter::$workers is always an upper limit of how many instances with the same key can acquire a lock. param: string $key PoolCounter instance key (any string) param: int $slots The number of slots (max allowed value is 65536) return: int |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |