Re: XForms: how does fl_show_question() do it ?

Steve Lamont (spl@szechuan.ucsd.edu)
Tue, 7 Jul 98 13:50:26 PDT

# To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> Do you mean that fl_do_forms() *can* be called in a reentrant way ? My
> experience to date has been that it can't, but that might be due to my
> attempt to use callbacks and, ugh, set/longjmp in this situation. heh.

It may depend upon what you mean by "reentrant." X11 and, by
extension, XForms are *not* reentrant or terribly thread-safe (there
are extensions in X11R6 which allow some threadability but they're
largely a kluge, IMHO).

You can indeed call fl_do_forms() from an XForms callback without any
problem. As I mentioned, that's basically how a lot of the Goodies
work.

I don't know how setjmp/longjmp affect things, specifically, but I'd
expect that you could badly confuse the X server and get the dreaded
Xlib asynch errors all over the place. It is best not to use such a
mechanism if it is at all avoidable. I've written some fairly
complicated applications, including some multi-threaded ones, and
have almost never had the need to resort to setjmp/longjmp.

spl

_________________________________________________
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/