octave-maintainers
[Top][All Lists]
Advanced

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

Re: Thread-safety issues in QtHandles


From: Michael Goffioul
Subject: Re: Thread-safety issues in QtHandles
Date: Thu, 3 Nov 2011 08:55:56 +0000

On Wed, Nov 2, 2011 at 11:42 PM, John W. Eaton <address@hidden> wrote:
> That's not a new problem, it's just showing up here for the first
> time.  So it is probably not the fault of your changes.
>
> See for example
>
>  https://savannah.gnu.org/bugs/?33981

I'm glad to hear that.

> The right way to define a function in a test is to use a %!function
> block, not to embed a function definition in the test.  Just change
> the lines in bicg.m to be
>
> %!function y = afun (x, t, a)
> %!  switch t
> %!   case "notransp"
> %!     y = a * x;
> %!   case "transp"
> %!     y = a' * x;
> %!  endswitch
> %!endfunction
>
> Does that also avoid the problem for you?

Yes.

> Also, do these changes help with the problems you were seeing earlier
> with the Qt code?

I don't know yet. I wanted to pass the full test suite first.

Regarding the problem above, I don't think octave should crash anyway.
A safer way could probably be to use shared_ptr in the parser as well
and prevent constructing octave_value directly from octave_base_value*
by making the constructor private.

Michael.


reply via email to

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