Re: xforms and unix threads

Mats Bergstrom (mb@talws10.nbi.dk)
Tue, 11 Mar 1997 17:48:54 GMT

To subscribers of the xforms list from mb@talws10.nbi.dk (Mats Bergstrom) :

-----BEGIN PGP SIGNED MESSAGE-----

> Has anyone written multi-threaded apps with xforms?? Is the library
> "thread safe"??

Yes, and don't know.

Unless you use R6 X11 is not very happy about multithreaded
applications, unless one thread ONLY performs the X11 calls.

What I did was to have one thread handing the X11. Threads that
wants to have something done on the screen sends a message to the
display handling thread which then does the job. Call backs are
also handled by the display handling thread which may send a message
to a thread to do the actual work etc. It's not very beautiful but it
works.

To use x and thread you can also have a look at man XInitThread, if
that draws a blank, you are probably best off with a cludgy solution
like I used.

/Mats

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2i
Comment: Processed by Mailcrypt 3.2, an Emacs/PGP interface

iQCVAwUBMyWbA+9OwlAnLJtlAQGlmQQAhsXtq3jyBEnk3UxKAIftnucz+ZM483MD
DbNJqF7atrBxIrZfJslBwRY3m2GIa67rUZNmn25qzsb+gJ0aIkmEsA7yiE4Zutk/
s1cqViv5TYYVcG8MRM0rmKne3onVRosUPY1vN5kCq8dEBNbZlK+EfY0oTNlCQy6G
iFcBJS4yzIs=
=DdiR
-----END PGP SIGNATURE-----
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/xforms-archive/