help-octave
[Top][All Lists]
Advanced

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

atomic functions


From: John W. Eaton
Subject: atomic functions
Date: Thu, 4 Jun 1998 09:37:24 -0500 (CDT)

On  4-Jun-1998, Artur Jorge Azevedo Carvalho <address@hidden> wrote:

| hi! is it possible to have atomic functions in octave? that is fuctions
| signaled as non interruptibles to octave?

Currently, you need to do something like this:

  #include <octave/sighandlers.h>

  // Save current SIGINT handler
  octave_interrupt_handler saved_handler = octave_ignore_interrupts ();

  // code that you don't want interrupted by SIGINT ...

  // Restore SIGINT handler
  octave_set_interrupt_handler (saved_handler);

| i've been looking thru the code and found one class called
| unwind_protect, does this class have anything to do with it?

The unwind_protect stack can be used to ensure certain actions occur
when intterupts or errors occur.  Usually this is used to restore
the values of global variables that have been temporarily altered.

jwe



reply via email to

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