cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl multi interface with Glib poll loop

From: Jeff Pohlmeyer <yetanothergeek_at_gmail.com>
Date: Wed, 29 Apr 2009 21:50:21 -0500

On Apr 29, 2009 Joshua Kwan wrote:

> I'm having a weird 100% CPU problem using the curl_multi_socket API and
> a glib main loop (driving a GTK+ UI.) When downloading a file, no matter
> how long it takes, the main loop just spams the progress callback over
> and over again (downloading a 95MB file off the local network incurs 3.6
> million callbacks!!)

> I'll be working on a reduced test case and can email it to the list
> sometime tomorrow. But for now, does anyone have any idea what could be
> going on?

There is an example here that uses a GMainLoop with the
curl_multi_socket API:

  http://curl.haxx.se/lxr/source/docs/examples/ghiper.c

It's been a while since I played around with it, but I sure don't
remember it as being a CPU hog.

 - Jeff
Received on 2009-04-30