Re: glib non blocking io



Eduardo Pérez Ureta <eperez dei inf uc3m es> writes: 
> But then I find functions like g_file_get_contents that if used
> can block the program because they are not integrated in the main event loop.
>

We have blocking functions, and we have non-blocking functions. You
can use whichever features you want.

g_file_get_contents(), gdk_pixbuf_new_from_file() are much more
convenient and safe to use than async I/O. So we provide those.

But we also have g_io_add_watch() and GdkPixbufLoader if you need
async operation.

> Will ever all these libraries will stop using blocking io functions
> like the ones from stdio and being integrated in the mail event loop ?

No, we aren't going to get rid of the blocking functions, because then
the library would be too inconvenient in many simple cases.

Havoc
 





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