Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^5: Can I/O operations on the same IO::Socket be executed in different threads?

by Anonymous Monk
on May 12, 2015 at 13:32 UTC ( [id://1126426]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Can I/O operations on the same IO::Socket be executed in different threads?
in thread Can I/O operations on the same IO::Socket be executed in different threads?

What, you request an example of a threaded program producing output to a socket? Obliged.

bash$ perl -Mthreads -e '$_->join for map async{ warn $_ for $_ .. $_ ++ 1e3 }, map $_ * 1e3, 1 .. 20' >& /dev/tcp/0/1234

  • Comment on Re^5: Can I/O operations on the same IO::Socket be executed in different threads?
  • Download Code

Replies are listed 'Best First'.
Re^6: Can I/O operations on the same IO::Socket be executed in different threads?
by Anonymous Monk on May 13, 2015 at 02:18 UTC

    >& /dev/tcp/0/1234

    that is not portable it won't work on windows -- portability is the point

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1126426]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-04-24 00:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found