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

alt statement, * qualifier



Hello,

I am currently working on a GUI app in Limbo, using Wm and Tk etc...

	So, my main loop consists of an alt statement which waits
on two channels, my GUI controls, and the wm channel. The program can
also be put into a "running" mode with one of the buttons such that
it executes continously, but should still be interruptable. I have tried
using the * qualifier with the alt statement, even with a sleep thrown
in the loop, but once that is there, neither of my other channels EVER
gets a chance. And because the * block first checks to see if the
program is in a "running" state, which it is not initially, it just
keeps doing that if clause over and over, forcing me to kill it with
the inferno task manager.

All of this has forced a TERRIBLE solution, and I'd appreciate some
help. Presently, whenever the program should go into "running" mode,
a new thread is created to send a heartbeat signal across a channel,
which is then checked in the alt {}. The heartbeat itself uses a sleep
to prevent overwhelming the main loop (and to keep things at a human-
watchable pace) but this is such a hack, I'd sure like to see something
simpler. Any ideas???????

Brian Osman