Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Perl Modules

    POE::Component::NonBlockingWrapper::Base 0.002

    Download button

    No screenshots available
    Downloads: 274  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Good (3.3/5)
    13 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Zoffix Znet | More programs
    Perl Artistic License / FREE
    April 8th, 2008, 13:33 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    POE::Component::NonBlockingWrapper::Base description

    POE::Component::NonBlockingWrapper::Base is a POE-based base Perl class for non-blocking wrappers around blocking stuff.

    POE::Component::NonBlockingWrapper::Base is a POE-based base Perl class for non-blocking wrappers around blocking stuff.

    SYNOPSIS

    use strict;
    use warnings;

    package POE::Component::Example;

    use POE;
    use base 'POE::Component::NonBlockingWrapper::Base';

    sub _methods_define {
    return ( get_time => '_wheel_entry' );
    }

    sub get_time {
    $poe_kernel->post( shift->{session_id} => get_time => @_ );
    }

    sub _process_request {
    # of course, here you'd normally do your blocking stuff
    $_[1]->{time} = localtime;
    }

    package main;

    use POE;
    my $poco = POE::Component::Example->spawn;

    POE::Session->create( package_states => [ main => [qw(_start results)] ], );

    $poe_kernel->run;

    sub _start {
    $poco->get_time({ event => 'results' });
    }

    sub results {
    print "Current time is: $_[ARG0]->{time}n";
    $poco->shutdown;
    }

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    non-blocking wrappers | POE component | Perl module | non-blocking | wrappers | Perl

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM