Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Well, not to blow my own trumpet _too_ much, have a look at this. It's a mud client (read almost telnet but not quite) using IO::Select. IMHO this is the more elegant way than threading or forking, since you neatly sidestep the delightful things known as 'concurrent issues'. Threading requires a certain amount more thought, especially when you do anything to modify a 'global' value. (Some models, threading is good, like for example, I'm currently hacking together an FTP download manager for which it'd suit well. Others, it's just overkill, and potentially dangerous.)
Update: Be aware that some network calls, such as 'gethostbyaddr()' at the OS level are NOT thread safe. I don't know how perl deals with this, but it's one to watch for.
It's not pessimism if there is a worse option, it's not paranoia when they are and it's not cynicism when you're right.

In reply to Re: Thread or Select for sockets?! by Preceptor
in thread Thread or Select for sockets?! by masuoda

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (2)
As of 2022-08-14 03:03 GMT
Find Nodes?
    Voting Booth?

    No recent polls found