curl-library
RE: Async cancel lengthy DNS lookup
Date: Thu, 31 Dec 2009 15:46:00 -0800
Daniel, thanks for your reply.
> No and yes. libcurl offers a wide variety of callbacks and
> most or all of them can cancel the operation. None of them
> are "instant" however so if you want a GUI or similar to get
> a feeling of instant reward I generally advice that you let
> the current thread take its time to stop (be it one second or
> three, it doesn't matter) and you start a new one for the
> next operation and thus the user won't know nor "feel" the
> non-instantness of libcurl's cancel.
Yes, I think that's a good idea. There is one potential issue though, if the
user closes the application while the thread is still running, which will
cause a delayed exit, if I choose to wait for the thread to end, or an
ungraceful exit if I use TerminateThread.
>
> > I saw that c-ares can be used for async dns lookup, but I'd
> rather not
> > add yet another dependency to all the projects I already maintain.
> > Besides, I couldn't find any info in the libcurl
> documentation on how
> > to actually add c-ares support.
>
> Define USE_ARES when you build libcurl.
I'll try that.
>
> > BTW, I sent a link to be inserted in your directory of
> libcurl powered
> > apps a while ago, but it was never listed. Are there any special
> > requirements for that?
>
> Hm, I must've missed that! Please mail me again with the details...
>
The url is http://www.yloader.com .
Thanks,
Adrian
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-01-01