Patent ID: 6918125

Claim:
A method of integrating an X Window visualization toolkit with a JAVA application comprising: providing a JAVA application thread that includes a call to an X Window visualization toolkit and a JAVA process thread that comprises an X Window event loop; suspending execution of the X event loop to prevent concurrency related data corruption while a call to the X Window visualization toolkit is made by the JAVA application thread; and wherein the application thread comprises a first write socket that is used to communicate a first data element to a first read socket of an XtAppAddInput file descriptor function of the X event loop, a read acknowledge socket of the application thread that acknowledges receipt of a second data element from a write acknowledge socket of the XtAppAddInput file descriptor function of the X event loop, and a second write socket that is used to communicate a third data element to a second read socket of the X event loop; and further comprising the steps of; communicating a first data element from the first write socket of the JAVA application thread to the first read socket of the X event loop; performing an application thread blocking read that suspends execution of the application thread until a second data element is discovered by the read acknowledge socket of the application thread; communicating the second data element from the write acknowledge socket of the X event loop to the read acknowledge socket of the application thread; resuming execution of the application thread when the second data element is discovered by the read acknowledge socket of the application thread; performing the X event loop blocking read that suspends execution of the X event loop until a third data element is discovered by the second read socket of the X event loop; making a call from the JAVA application thread to the visualization toolkit while execution of the X event loop is suspended; communicating the third data element from the second write socket of the application to the second read socket of the X event loop; and resuming execution of the X event loop when the third data element is discovered by the second read socket of the X event loop.