Re: Large files and asynchronous IO



Alexander Lyakas wrote:
Hi all,
I have been really impressed with GLib, portability and all.
There are, however, two features I need, but I am not sure whether they exist.
1) Can I create large files with GLib? (Over 2 GB)

That should depend on the filesystem you are using, otherwise;
A quick glance at giounix.c says that there is no mention of
`O_LARGEFILE' but I dont think many systems use this flag.

(Note also you can open any file in whatever way you like and then
feed the descriptor to g_io_channel_unix_new ())

2) Is there some support for asynchronous IO?
    I would like to issue an IO request and to proceed immediately,
    being able to check/be notified when the request is completed.

    There is no integrated support for async io requests, you'd
probably have to thread your io request; and when your thread
finishes its io, it can notify the main thread of the io status
(and that it probably neads to be "reaped" with g_thread_join() )
via the g_idle_add () function.

Cheers,
                         -Tristan



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