Thursday, August 7, 2008

Win32 and LibEvent

I found a hack that lets my win32 console workaround cohabitate with LibEvent for the present; if I wedge a SleepEx( 0, TRUE ) before I let event_loop take away my CPU, the console can take advantage of QueueAPC to post any I/O updates to the main virtual machine thread. It's a grotesque hack, but necessary because LibEvent's WIN32 logic uses WIN32's select emulation. Long term, I need to fire off a patch upstream to LibEvent, removing the poor performance of select, and moving to the more modern I/O completion callbacks. (Well, as modern as anything derived from VMS network programming can be..) But, for now, I can safely release WaspVM 0.3 and see about getting work done on documentation and perfection.