Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

....And that is why it it should come as no surprise to anyone that you have 130911 XP at perlmonks, probably more once I hit the "submit" button; because you are awesome. Your code speaks for itself.

...And with no disrespect I have to say that the awesomeness of that code design is very similar in practice to the approach I used for my own assignment at $work, only I used the threads a little differently. There were two primary threads that shared a queue -- a downloader and a queue processor, and the downloader spawned five to ten threads to process downloads in parallel and return their downloaded payload as scalars to the primary downloader thread. The downloader then put together the datastructure that became the queue which was then consumed by the queue processor thread.

Everything worked fine on my RHEL 6 machines and my Debian servers. It even worked on the ubuntu workstation I was developing on at the time... But it puked on those proprietary custom-built RHEL 5 beasties. I was heartbroken, because it was clear that I had to abandon the code while it was so pure and elegant. It became much more cumbersome than one might think when I had to start bolting on Storable and working out my own locking mechanisms. Sure, I had the core files and I might have been able to dig deeper into the problem with those, but I didn't even want to start poking at them for fear that the approach was ultimately toxic. Maybe that was a mistake, but I had a looming deliverable and I couldn't take the risk of burning through development time trying to work out an already problematic methodology (at least in that environment). In the end, it was my name on the code when I handed it over, and naturally it had to function without flaw.

At the end of the day, upper management didn't give an END {} block how the code was written; they cared that it met client requirements, that it required very little RAM, that it ran bullet-proof for months at a time, and that everybody looked good for getting it done on time.

I always lamented what I saw as a lost opportunity, but took it as a lesson learned to -- at least for me -- beware of threads::shared on old perls.

Thank you for taking the time to put together that code sample

--
Tommy
$ perl -MMIME::Base64 -e 'print decode_base64 "YWNlQHRvbW15YnV0bGVyLm1lCg=="'

In reply to Re^9: removing all threads.. by Tommy
in thread removing all threads.. by ISAI student

Title:
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 How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

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

    No recent polls found