Hi ken, Thanks for the thorough message. I am having difficulties with outputting my data to stdout, in the format that I wanted. The way I wrote it is when the individual threads complete, they execute this code:
if( $response->is_success ) { print"\n\n", $counter_thread++,"th :", "Dumped Data Return +ed:\n\n ", Dumper($response->decoded_content), "\n" ; print "Response code: ", $response->code, "\n", "HTTP Response Message: ", $response->message, " ", "\n"; } else { print STDERR $response->status_line, "\n"; }
However, they come out in unsorted order. I am trying to print each thread in order with time elapsed for each thread, decoded_content in a neat way. As an example, the variable '$counter_thread' would print like 2,5,8, 10,7, etc. to stdout. Is this a threading issue? What is the best way to go about this? Chris
In reply to Re^2: HTTP Requests and Threading
by carlriz
in thread HTTP Requests and Threading
by carlriz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |