On Thursday, 24 January 2019 at 15:28:19 UTC, Suliman wrote:
I am doing very small link-checker. Here is' code https://run.dlang.io/is/p8whrA

I am expecting that on line:
writefln("url: %s, status: %s", url.url, url.status);

I will print link and it's status. But I am getting only:
url: http://127.0.0.1:8081/hck, status:
url: http://127.0.0.1:8081/hck2, status:
url: http://127.0.0.1:8081/hck3, status:

It's seems that I missed something with refs? Could you help me find error?

You're writing asynchronous code and expecting it to process synchronized. Just make a synchronous call. If you need async use message passing with concurrency, probability on each call to the url so you can do the slow operations in parallel.

Reply via email to