T.R | Title | User | Personal Name | Date | Lines |
---|
1260.1 | | PSW::WINALSKI | Meetings are our most important product | Fri Aug 11 1989 15:08 | 17 |
| (1) Use VAX Ada and do all DECwindows work from one task. Advantage: very low
overhead. Disadvantage: your application has to be written in Ada.
(2) Use work procedures. Advantage: low overhead. Disadvantage: your work
has to be broken into little chunks so that X events get dispatched in a
timely fashion. Also, your program can wind up busy-waiting if you forget
to deassign the work procedure.
(3) Run the compute-bound stuff in a separate process from the screen stuff.
Advantage: the OS scheduler handles interleaving X event processing and
your processing for you. You don't have to restructure the compute-bound
part of your application. Disadvantage: you have to deal with some sort
of interprocess communication to pass data back and forth between the two
processes.
--PSW
|
1260.2 | A fourth possibility | REINIG::REINIG | This too shall change | Fri Aug 11 1989 16:10 | 14 |
| Paul left out one possibility. Your compute bound code can dispatch x
events every so often. TPU does this. We have a timer that goes off
every so often which sets a bit which tells us to dispatch X events.
Anyplace that TPU can loop, it checks this bit, and calls a routine to
dispatch X events if necessary.
It still needs some fine tuning but it does work. One reason we chose
this is that it required very little change to our existing code. We
already checked for control C's everywhere and that check was in a
macro. So, all we had to do was add the timer AST and change the
macro.
August G. Reinig
|
1260.3 | LISP provides another way, too. | AITG::WELLS | Unmatched parenthesis | Fri Aug 11 1989 18:17 | 11 |
| Another possibility, for internal folks, is to use LISP. We have
threads (similar to Ada tasks) that we use for the same kind of stuff.
(But this doesn't help Sue -- she works in our group, but they're not
using LISP for their project. :-( )
If anyone out there is interested in trying this stuff out, send me
mail.
Richard
|
1260.4 | | DWOVAX::YOUNG | in the iron grip of bureaucracy | Sun Aug 13 1989 12:24 | 5 |
| Re .1 & .3:
I thought that the DECwindows (& Xwindows) routines were not
AST-reentrant, let alone fully reentrant?
|
1260.5 | Re: .4: | AIRPRT::GRIER | mjg's holistic computing agency | Sun Aug 13 1989 13:02 | 5 |
| Xlib is re-entrant, the toolkit and such are not.
-mjg
|
1260.6 | We don't use the toolkit at AST level | REINIG::REINIG | This too shall change | Mon Aug 14 1989 12:04 | 8 |
| The only thing we do at AST level is set an internal flag and use some
X routines. As .4 said, X is re-entrant. We don't dispatch events
until we are back at normal processing level. This is why ALL of our
loops check our internal flag. It's a lot of checking, but it was
already there.
August G. Reinig
|