Re: XForms: keyboard entry and threads

From: Jeff Pierce (wd4nmq@comcast.net)
Date: Thu Apr 10 2003 - 13:18:25 EDT

  • Next message: Peter S Galbraith: "Re: XForms: Today's commits"

    # To subscribers of the xforms list from Jeff Pierce <wd4nmq@comcast.net> :

    Enrico,

    Thanks for the information. Removing teh XInitThreads() fixed the problem.

    So, now what is the purpose of XInitThreads(). According to the man
    pages it seems to only be needed to lock out a context from the main
    event handler so a thread can make x calls to it with out interance from
    the main thread event handler.
    Is that a correct assumption?

    defilippo@lns.infn.it wrote:
    > # To subscribers of the xforms list from defilippo@lns.infn.it :
    >
    > Hi,
    >
    > I had the same problem, also if XInithreads works very well on Solaris 7,
    > where I don't need to use mutex protections.
    >
    > On Linux sistems the use of Xinithreads hangs the process when you hit
    > the keyboard. The only solution I have found on Linux is do not use
    > XIniThreads, hoping that mutex protection is sufficient
    > to resolve the problem of multiple call to Xlib routines.
    > A thing that I have not well understood is if the loop
    >
    > while(1){
    > timeout.tv_sec = 0;
    > timeout.tv_usec = 10000;
    > select(0, NULL, NULL, NULL, &timeout);
    > pthread_mutex_lock(&Lock);
    > fl_check_forms();
    > pthread_mutex_unlock(&Lock);
    > }
    >
    > have to be used only in the main loop code or also in all secondary
    > forms (when the program is constituted by multiple forms).
    >
    > Anyway, ... to found why XIniThreads does not run properly on Linux
    > would be the best solution.
    >
    > Enrico
    > _________________________________________________
    > To unsubscribe, send the message "unsubscribe" to
    > xforms-request@bob.usuhs.mil or see
    > http://bob.usuhs.mil/mailserv/xforms.html
    > XForms Home Page: http://world.std.com/~xforms
    > List Archive: http://bob.usuhs.mil/mailserv/list-archives/
    > Development: http://savannah.nongnu.org/files/?group=xforms
    >

    -- 
    Jeff, wd4nmq
    wd4nmq@comcast.net
    http://mywebpages.comcast.net/wd4nmq
    

    _________________________________________________ To unsubscribe, send the message "unsubscribe" to xforms-request@bob.usuhs.mil or see http://bob.usuhs.mil/mailserv/xforms.html XForms Home Page: http://world.std.com/~xforms List Archive: http://bob.usuhs.mil/mailserv/list-archives/ Development: http://savannah.nongnu.org/files/?group=xforms



    This archive was generated by hypermail 2b29 : Thu Apr 10 2003 - 13:22:03 EDT