Title: | DECWINDOWS 26-JAN-89 to 29-NOV-90 |
Notice: | See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit |
Moderator: | STAR::VATNE |
Created: | Mon Oct 30 1989 |
Last Modified: | Mon Dec 31 1990 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 3726 |
Total number of notes: | 19516 |
I am trying to set up two programs to communicate with each other. Program 1 is a non-window program which wants to send data asynchonously to Program 2, an xlib program. I am thinking of implementing it in the following way: Set up a mailbox between the two programs and set an attention ast on the mailbox in Program 2. The AST routine of program 2 simply reenables the ast and does an xsendevent. The xnextevent in Program 2 should see this event and control can then be passed to a routine to process this data. Is this a good way to do it? The worry is that xlib is not reentrent enough to call xsendevent while it is spinning in xnextevent. If this is the "Right" way to do this, is there any particular event that would be better to use than any other? Is there a better way? Any help would be greatly appreciated. Thanks, Jeff
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
2629.1 | PSW::WINALSKI | Careful with that VAX, Eugene | Wed Apr 18 1990 15:42 | 5 | |
I've done exactly what you outline in .0 and it works. Aside from a few bugs that are irrelevant to this case, Xlib is reentrant. However, avoid any Dwt or Xt calls. The Toolkit is not reentrant at all. --PSW | |||||
2629.2 | STAR::HARDY | Wed Apr 18 1990 16:04 | 7 | ||
There was a bug in Xlib prior to VMS version 5.4, wherein AST routines which read events or replys would inhibit the non-AST thread from returning from Xlib. To be safe, use VMS 5.4 when you implement your program. Sam |