@sync @parallel for i=1:1000
    assert(get("http://127.0.0.1:5000/";).http_code == 200)
end

@parallel without a reducer is asynchronous



On Mon, Mar 9, 2015 at 4:36 AM, empty account <[email protected]>
wrote:

> Hi,
>
> I am trying to time how long x amount of http requests take.
>
> using HTTPClient
>
> tic()
> @parallel for i=1:1000
>     assert(get("http://127.0.0.1:5000/";).http_code == 200)
> end
> toc()
>
>
> However, when I run as a script though the command line
>
> $ julia -p 2 conc.jl
>
> Only 9 requests are made,
>
> But all 1000 requests are made when running through the REPL, however the
> timer does not wait for parallelisation to complete.
>
> I wondered if anyone could point me in the right direction?
>
> Many Thanks
>
> Adrian
>
>
>
>
>

Reply via email to