glib/tests
Tor Lillqvist b965bb5db1 Finally, a new and improved IO Channel and condition watch implementation
2000-07-30  Tor Lillqvist  <tml@iki.fi>

	Finally, a new and improved IO Channel and condition watch
	implementation for Win32. Based on code provided by Craig Setera.

	When watching file descriptors, for which there is no select()
	like functionality on Win32 that would work on all Win32 platforms
	for all types of file descriptors (including anonymous pipes), we
	start a new thread that blocks while trying to read from the file
	descriptor. When the read returns, a Win32 Event is signalled that
	the polling routine eventually notices. Meanwhile, the data being
	read is stored in a circular buffer, from where the IO channel's
	read() method picks it up.

	If the buffer fills up the reading thread has to wait for space
	becoming available. For this another Win32 Event is used. The IO
	Channel's read() method signals this when it has read some data
	out of the buffer.

	The separate reader thread(s), and the circular buffer(s) with
	associated events mean lots of possibilities for fun parallellism
	errors. But it seems to work OK, i.e. GIMP runs.

	* gmain.c: Small changes to the Win32 polling function.
	(g_main_win32_get_poll_func): New function. Perhaps it would be a
	good idea to provide this on all platforms.

	* giowin32.c: The bulk of the new implementation.
	(g_io_channel_win32_wait_for_condition): New function. To be used
	where on Unix one does a select() on the channel's fd, like
	libgimp's gimp_extension_process(). Could be provided on all
	platforms.

	* glib.h: Update documentation for IO Channels on Win32. Remove
	the declarations for the as of now obsolete old functions related
	to IO Channels for pipes with "wakeup" messages.

	* glib.def: Some new functions.

	* tests/gio-test.c: New file, to test GIOChannel and main loop.

	* tests/Makefile.am
	* tests/makefile.mingw.in: Add it.
2000-07-29 20:59:07 +00:00
..
.cvsignore New File implementing an asynchronous queue to be used for asynchronous 2000-04-28 12:24:53 +00:00
array-test.c applied patch from Andreas Persenius <ndap@swipnet.se> that updates the 2000-07-26 11:02:02 +00:00
date-test.c Mention the tests directory. 1999-04-13 21:05:08 +00:00
dirname-test.c applied patch from Andreas Persenius <ndap@swipnet.se> that updates the 2000-07-26 11:02:02 +00:00
gio-test.c Finally, a new and improved IO Channel and condition watch implementation 2000-07-29 20:59:07 +00:00
hash-test.c applied patch from Andreas Persenius <ndap@swipnet.se> that updates the 2000-07-26 11:02:02 +00:00
list-test.c applied patch from Andreas Persenius <ndap@swipnet.se> that updates the 2000-07-26 11:02:02 +00:00
Makefile.am Finally, a new and improved IO Channel and condition watch implementation 2000-07-29 20:59:07 +00:00
makefile.mingw.in Finally, a new and improved IO Channel and condition watch implementation 2000-07-29 20:59:07 +00:00
makefile.msc.in Add new functions. Add new object files. Add threadpool-test. No need to 2000-05-01 21:13:02 +00:00
node-test.c applied patch from Andreas Persenius <ndap@swipnet.se> that updates the 2000-07-26 11:02:02 +00:00
queue-test.c Renamed g_queue_create to g_queue_new in conformance to all other GLib 2000-04-17 10:31:10 +00:00
rand-test.c Moved struct declaration up. Style fixes. 1999-04-12 12:53:37 +00:00
relation-test.c applied patch from Andreas Persenius <ndap@swipnet.se> that updates the 2000-07-26 11:02:02 +00:00
slist-test.c applied patch from Andreas Persenius <ndap@swipnet.se> that updates the 2000-07-26 11:02:02 +00:00
strfunc-test.c applied patch from Andreas Persenius <ndap@swipnet.se> that updates the 2000-07-26 11:02:02 +00:00
string-test.c applied patch from Andreas Persenius <ndap@swipnet.se> that updates the 2000-07-26 11:02:02 +00:00
testgdate.c fixed SIZEOF_LONG==4 assumption with ENABLE_MEM_CHECK, from Art Haas 2000-05-19 08:18:29 +00:00
testgdateparser.c Two new files. This is kind of ugly code, but I want to go ahead and make 1998-12-02 20:20:35 +00:00
testglib.c applied patch from Andreas Persenius <ndap@swipnet.se> that updates the 2000-07-26 11:02:02 +00:00
thread-test.c Made the debugging G_TRYLOCK call also work for compilers with funnt 2000-04-19 09:29:19 +00:00
threadpool-test.c New File implementing an asynchronous queue to be used for asynchronous 2000-04-28 12:24:53 +00:00
tree-test.c applied patch from Andreas Persenius <ndap@swipnet.se> that updates the 2000-07-26 11:02:02 +00:00
type-test.c applied patch from Andreas Persenius <ndap@swipnet.se> that updates the 2000-07-26 11:02:02 +00:00