cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: multithreads or multi interface

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Mon, 5 Sep 2005 14:08:08 +0200 (CEST)

On Mon, 5 Sep 2005, Alexander Lazic wrote:

> Can you tell me your opinion about your prefered Methode, between threads
> and the multi interface.

Both should work equally fine, and you can pick the one that suits you the
most. The multi interface is not yet 100% non-blocking, which threads are
likely to be. (Depends on your platform and threads of course.)

> Is it possible to use poll() or an external library which handle the
> sockets which came from 'curl_multi_fdset'.

No.

> curl use internal poll, if available therefore i think it should be
> possible, isn't it?

Yes it uses poll() internally, but libcurl doesn't offer any API to extract
the information to applications in a format suitable for use with poll(). This
issue is addressed in the multi_socket() suggestion for a new and improved API
for the multi interface. See the include/curl/multi.h header file for details
on that.

Don't hold your breath for that to get implemented any time soon though...

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2005-09-05