R: XForms: Threadsafe

From: Paolo Prandini (prandini@spe.it)
Date: Thu Jun 01 2000 - 11:52:15 EDT

  • Next message: Paolo Prandini: "R: XForms: Threadsafe"

    # To subscribers of the xforms list from "Paolo Prandini" <prandini@spe.it> :

    > I don't think it ever was purported to be so.

    I discovered it the hard way.

    > > The possible solutions are:
    > > a) rewrite everything with another lib that is threadsafe
    > > b) fix XForms
    > > But to fix XForms I need the source code! What about letting me do this
    > > kind of modification? Or maybe there is a threadsafe version in
    > the works?
    > > Thanks for any suggestion.
    > To fix XForms, you'd also have to fix the entire X Window System, too
    > -- it is not thread safe to the best of my knowledge. There are some
    > extensions in X11R6 for multithreading but they are kind of crufty, if
    > memory serves. Different threads all trying to communicate with the X
    > Server will confuse it -- resulting in the dreaded "async error."

    With glibc2 in Linux 2.2 (e.g. Red Hat 6.1) and an appropriate
    recompilation (if not already done like in RH) XWindows IS threadsafe;
    in fact gtk is threadsafe or can be easily programmed in a threadsafe
    way. So this is not a problem.

    > On the other hand, I have written a threaded application which uses
    > XForms and X. The trick is to sequester all of the X and XForms calls
    > into a single thread and let the other threads go about their business
    > independently. It's not a perfect solution but about the only one
    > which will work without a major revamping of not only XForms but also
    > the entire X Window System.

    Well, the revamping is needed only for XForms, just to destroy a myth
    about X. Anyway I tried of course your solution but it is way too slow
    for a realtime application, the user expects to see moving coordinates
    on the screen, not jumping ones.
    Thanks anyway
    To unsubscribe, send the message "unsubscribe" to
    xforms-request@bob.usuhs.mil or see
    XForms Home Page: http://world.std.com/~xforms
    List Archive: http://bob.usuhs.mil/mailserv/list-archives/

    This archive was generated by hypermail 2b29 : Thu Jun 01 2000 - 12:06:51 EDT