g_file_read block



Hello list,
In my application, I'm trying to connect to a remote webserver and
grab an image file (output of a CGI program), and I'm trying to use
GIO for this. I call g_file_new_for_uri with the URL, and then call
g_file_read to get the input stream. It works for the most part, but
I'm seeing that if the application ends up sending a larger number of
consecutive requests (user requests refreshes very often), the program
locks up. Running under gdb, I can do a ^C and backtrace, it fails on
the call to g_file_read. Somewhere deep inside g_file_read, the
program is waiting in a call to "poll".

Am I calling things in the wrong order? I do have a cancellable and a
GError passed to g_file_read, if that makes a difference.

Platform: Linux (Fedora 14)
Glib: 2.26.0

Thanks,
-Jim

PS, if someone could point me to a GIO tutorial, that would be nice. I
haven't had much luck with the library, ever since I ported my
application from using curl to GIO, it's been endless headaches with
issues like this, that I'm sure are being caused by me not knowing how
to use GIO properly.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]