in reply to Re^3: Do I need to use Coro instead of threads/forks
in thread Do I need to use Coro instead of threads/forks

I have created a test where i removed vendors and put in Coros instead of threads both in main and worker threads.
The script works fine even on actual data (tried with only two vendors i.e. 2 main threads and thread 1 opening 2 more inside it).
I am observing time taken to complete output and have not seen any improvement so far.
Further testing needs to be done to see if it is fetching data in parallel.
In 3 iterations it took 12 to 17 sec to finish.
With OS threads it should be around 10 to 12 sec. (need to confirm)

  • Comment on Re^4: Do I need to use Coro instead of threads/forks

Replies are listed 'Best First'.
Re^5: Do I need to use Coro instead of threads/forks
by Corion (Patriarch) on Sep 29, 2014 at 13:21 UTC

    Note that you cannot present all data until the last vendor has replied.

    If you want to present information as it becomes available, you will need to add Javascript code on the browser side to read the information as it becomes available and progressively display the information to the user.