Main > Programming > Libraries >

Thread::Apartment 0.51

Thread::Apartment 0.51

Sponsored Links

Thread::Apartment 0.51 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.072 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 862
Date added: 2007-06-14
Publisher: Dean Arnold

Thread::Apartment 0.51 description

Thread::Apartment is an apartment threading wrapper for Perl objects.

SYNOPSIS

package MyClass;

use Thread::Apartment::Server;
use base qw(Thread::Apartment::Server);

sub new {
#
# the usual constructor
#
}
#
# mark some methods as simplex
#
sub get_simplex_methods {
return { bar => 1 };
}
#
# mark some methods as urgent
#
sub get_urgent_methods {
return { bingo => 1 };
}

sub foo {
#
# do something
#
}

sub bar {
#
# do something else
#
}

sub bingo {
print "BINGO!n";
}

1;

#
# create pool of 20 apartment threads
#
Thread::Apartment->create_pool(AptPoolSize => 20);

my $apt = Thread::Apartment->new(
AptClass => MyClass, # class to install in apartment
AptTimeout => 10, # timeout secs for TQD responses
AptRequire => { # classes to require into the thread
This::Class => 1.234,
That::Class => 0.02
},
AptParams => @params_for_MyClass) || die $@;

my $result = $apt->foo(@params);
die $@ unless $result;
#
# bar is simplex
#
$apt->bar(@params);

Thread::Apartment provides an apartment threading wrapper for Perl classes. "Apartment threading" is a method for isolating an object (or object hierarchy) in its own thread, and providing external interfaces via lightweight client proxy objects. This approach is especially valuable in the Perl threads environment, which doesnt provide a direct means of passing complex, nested structure objects between threads, and for non-threadsafe legacy object architectures, e.g., Perl/Tk.

By using lightweight client proxy objects that implement the Thread::Queue::Queueable interface, with Thread::Queue::Duplex objects as the communication channel between client proxies and apartment threads (or between threads in general), a more thread-friendly OO environment is provided, ala Java, i.e., the ability to pass arbitrary objects between arbitrary threads.

Thread::Apartment 0.51 Screenshot

Advertisements

Thread::Apartment 0.51 Keywords

Bookmark Thread::Apartment 0.51

Hyperlink code:
Link for forum:

Thread::Apartment 0.51 Copyright

WareSeeker periodically updates pricing and software information of Thread::Apartment 0.51 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Thread::Apartment 0.51 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
Thread::Tie can tie variables into a thread of their own. Free Download
DM1 Threads Library is a portable threads library in C++. Free Download
Thread::Pool contains group of threads for performing similar jobs. Free Download
Cute PHP library is a small collection of classes for PHP. Free Download
Threads-pop3d provides a very fast and light THREADS POP3 Daemon which can work with MySQL. Free Download
RT-Thread is a real-time operating system. Free Download
Sub::DeferredPartial is a deferred evaluation / partial application. Free Download
Inter-Thread Communication (ITC) aims to make it exceedingly easy to call functions in other threads. Free Download