Re: async file i/o
- From: Michael Rothwell <rothwell holly-springs nc us>
- To: David Helder <dhelder umich edu>
- Cc: gtk-app-list <gtk-app-devel-list gnome org>
- Subject: Re: async file i/o
- Date: Tue, 16 Jan 2001 13:55:38 -0500
David Helder wrote:
O_NONBLOCK should work. E.g.:
state->fd = open (state->pathname, O_RDONLY | O_NONBLOCK);
Then you can use select() or create an IOChannel from the file handle and
use g_io_channel_add_watch().
I just wrote a small program using glade to read a file from a floppy in
4096 byte chunks, using O_NONBLOCK and GIOChannel. It blocks. :(
-M
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]