[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

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

2629.0. "Passing data between two processes" by PEACHS::GILBERT (...You say why, I say I dont know) Wed Apr 18 1990 15:37

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.RTitleUserPersonal
Name
DateLines
2629.1PSW::WINALSKICareful with that VAX, EugeneWed Apr 18 1990 15:425
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.2STAR::HARDYWed Apr 18 1990 16:047
    
    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