POE::Component::Pool::Thread

POE::Component::Pool::Thread is a POE Managed Boss/Worker threadpool.
Download

POE::Component::Pool::Thread Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Scott McCoy
  • Publisher web site:
  • http://search.cpan.org/~tag/POE-Component-Pool-Thread-0.015/Thread.pm

POE::Component::Pool::Thread Tags


POE::Component::Pool::Thread Description

POE::Component::Pool::Thread is a POE Managed Boss/Worker threadpool. POE::Component::Pool::Thread is a POE Managed Boss/Worker threadpool.SYNOPSIS use POE qw( Component::Pool::Thread ); POE::Component::Pool::Thread->new ( MinFree => 2, MaxFree => 5, MaxThreads => 15, StartThrneads => 5, Name => "ThreadPool", EntryPoint => &thread_entry_point, CallBack => &result_handler, inline_states => { _start => sub { my ($kernel, $heap) = @_; # We are inside the component session $kernel->yield(run => @arguements); $kernel->post(ThreadPool => run => @arguements); }, } ); sub thread_entry_point { my (@arguements) = @_; return 1; } sub result_handler { my ($kernel, $result) = @_; $result == 1; }This is an expand-on-demand thread pool managed through a POE session in a manner that does not interfer with cooperative multitasking. A single pipe is created, each thread communicates its state to the main process through this pipe. No serialization occurs (these are threads, not child processes), so execution is very fast. Requirements: · Perl


POE::Component::Pool::Thread Related Software