octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: interrupt handing and the GUI (bug #37672)


From: John W. Eaton
Subject: Re: interrupt handing and the GUI (bug #37672)
Date: Mon, 11 Nov 2013 00:48:05 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12

On 11/10/2013 09:59 PM, Daniel J Sebald wrote:

        
http://pubs.opengroup.org/__onlinepubs/009695399/__functions/pthread_cond_signal.__html
        
<http://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_cond_signal.html>


OK, interesting read.  This is about blocked threads (which isn't
the exact scenario) but I see your point about the asynchronous part
of it.

If the condition variable could be set in a signal handler, then the
way it would be used is

  * start the calculation thread

  * stop the main thread, waiting for either the calculation thread to
    finish, or for a signal to occur.  The notification would come
    from a condition variable.

This approach would be better than polling, but would only work if it
is OK to set a condition variable in a signal handler, which
apparently it is not.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]