Re: async file i/o
- From: David Helder <dhelder umich edu>
- To: Michael Rothwell <rothwell holly-springs nc us>
- Cc: gtk-app-list <gtk-app-devel-list gnome org>
- Subject: Re: async file i/o
- Date: Tue, 16 Jan 2001 13:24:09 -0500 (EST)
On Tue, 16 Jan 2001, Michael Rothwell wrote:
David Helder wrote:
You can open the file non-blocking and then use IOChannels.
Do you have an example? As far as I can tell, O_NONBLOCK does nothing.
read() and write() block anyway.
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().
David
--
__ _ __ David Helder - University of Michigan
___/ /__ __ __(_)__/ / dhelder umich edu
/ _ / _ `/ |/ / / _ / http://www.eecs.umich.edu/~dhelder
|_,_/|_,_/|___/_/|_,_/ Jungle Monkey: http://www.junglemonkey.net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]