in reply to What's the best way to fetch data from multiple sources asynchronously?

I've implemented something similar using threads before. You can set up a job queue and have worker threads collect these jobs (sql queries), execute them, then return the data to some shared data object such as an array or hash. This shared object might then be tied to your output screen (console or gui?). It will certainly work on Windows and Linux. How do you wish to port your program?
  • Comment on Re: What's the best way to fetch data from multiple sources asynchronously?

Replies are listed 'Best First'.
Re^2: What's the best way to fetch data from multiple sources asynchronously?
by perrin (Chancellor) on Jan 01, 2007 at 19:36 UTC
    Was the thing that you implemented using DBD::mysql? It's not very clear if that module is thread-safe.
      I did use DBD::mysql and it didn't cause any multi-threading problems. At least the module's documentation suggests it is thread safe. I may have kept a separate DB handle open in each thread though I am not entirely sure as it was several years ago.
        I'm sure you'd need a separate handle in each thread, but wasn't sure it would work at all. Thanks for the info.