POE::Component::ResourcePool::Request - A bundle of resource request parameters.
$pool->request( # specify what you want params => { resource_name => ..., other_resource => ..., }, # specify what to do when you've got what you want event => "moose", );
The request object represents a bundle of required resources in the queue.
A request will wait in a pool's queue until sufficient resources are available to dispatch them, at which point its callback will be triggerred.
A request can be deallocated by calling dismiss, returning the allocated value to the resource.
dismiss
When a resource is garbage collected it will call dismiss automatically.
dismiss can also be called before the request is fulfilled in order to cancel it.
Create a new request
If the request has already been fulfilled then deallocate it, otherwise cancel it.
Returns a boolean value denoting whether or not the request has been dismissed.
Returns a boolean value denoting whether or not the request has been fulfilled.
Returns a boolean value denoting whether or not the request has been canceled (dismissed but not fulfilled).
The callback to call when the request is fulfilled.
See also the event attribute.
event
An event name to post to on the currently active session at the time of the resource's creation. Used to generate a default callback.
post
callback
THe ID of the currently active session at the time of the resource's creation. Used to generate a default callback and to increment the reference count of sessions waiting on resources.
If the current session is not the session that the request should be associated with then this parameter may be specified, but in general that is discouraged.
To install POE::Component::ResourcePool, copy and paste the appropriate command in to your terminal.
cpanm
cpanm POE::Component::ResourcePool
CPAN shell
perl -MCPAN -e shell install POE::Component::ResourcePool
For more information on module installation, please visit the detailed CPAN module installation guide.