lua-users home
lua-l archive

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


Sometime on 22 Sep 2008, "Xu Wang" <xu4wang@gmail.com> wrote:
>...
>Please send me a copy too.
>...
>2008/6/23 Asko Kauppi <askok@dnainternet.net>
>>...
>> For a ported serial module, see:
>> http://lua-users.org/lists/lua-l/2007-09/msg00465.html
>> ...

I'll take this as a reminder that I promised to produce a clean
wrapping of the COMM API last Summer. Since it is now officially
Fall, I should probably try to finish that up and publish it. ;-)

When I got distracted by helping Asko test his new release of
Lanes on XP, I was looking for a framework to verify that the
serial API was easy to use in a threaded environment as an
alternative to diving into proper support for Windows Overlapped
I/O calls.

Unfortunately, testing of my wrapper was showing that it wasn't
as practical as I expected to use very short (or zero length)
timeouts and polling as a means of handling bi-directional
communications in a single thread. My intent is to demonstrate
that Lanes will allow use of blocking I/O in worker threads that
communicate with program logic and/or UI in a third thread via
FIFOs implemented by Lindas provided by Lanes.

An unexpected result of this is that I have a recipe (that I also
need to publish "soon") for integrating Lanes with IUP so that
worker threads can communicate with the UI. This can be done with
no changes to either Lanes or IUP by using an IUP Timer control
to poll a Linda, but I still would like to integrate Lindas into
the IUP event model more completely which will require writing a
glue module and taking care of some platform portability issues.

I've also learned more than I want to know about getting MinGW to
build DLLs compatible with LuaBinaries and Lua for Windows....

Ross Berteig                               Ross@CheshireEng.com
Cheshire Engineering Corp.           http://www.CheshireEng.com/