develooper Front page | perl.beginners | Postings from April 2010

Thread Queues and Sockets

Iker Perez de Albeniz Villarroel
April 13, 2010 04:33
Thread Queues and Sockets
Message ID:


I am having problems creating a multithread queued Server because i can
not enqueue sockets..


For example is not possible to make something like this..


my $Qwork = new Thread::Queue;

our $server = new Net::SMTP::Server($host) || 

while(my $conn = $server->accept()) {





Because $conn is not a shared object and can not be shared.. so
searching in google I have found a way to  do this using fileno function
and engueuing the fileno of this socket and then reopening the socket
using the fileno but does not work for me...


Is there an other way to do this easily? Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About