The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

threads::emulate::async - Create emulated thread (part of threads::emulate)

VERSION

Version 0.0.4

SYNOPSIS

This module is part of hreads::emulate

    async {
        print "New thread...$/" for 1 .. 10
    }
    print "Old thread...$/" for 1 .. 10

FUNCTIONS

new

If you use the new() method, the thread will not run until you call the run() method of the object. Diferent from using the async() function. The async() function create the object, run the sub in a thread and return the obj.

run

Run the new thread

kill

Sends a signal for the thread

get_pid

Gets the pid of the thread

get_tid

Gets the thread id of the thread

join

Wait for the thread finish and return the return of the function

get_return

If the thread is finished return the return of the sub, else return undef

AUTHOR

Fernando Correa de Oliveira, <fco at cpan.org>

BUGS

Please report any bugs or feature requests to bug-threads-emulate-async at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=threads-emulate-async. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc threads::emulate::async

You can also look for information at:

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2009 Fernando Correa de Oliveira, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.