octave-maintainers
[Top][All Lists]
Advanced

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

Re: Connecting Octave to the GUI


From: Michael Goffioul
Subject: Re: Connecting Octave to the GUI
Date: Mon, 8 Apr 2013 17:51:11 -0400

On Mon, Apr 8, 2013 at 5:48 PM, Daniel J Sebald <address@hidden> wrote:
On 04/08/2013 04:39 PM, John W. Eaton wrote:
On 04/08/2013 05:30 PM, Michael Goffioul wrote:
On Mon, Apr 8, 2013 at 4:25 PM, John W. Eaton <address@hidden
<mailto:address@hidden>> wrote:

On 04/08/2013 04:15 PM, Daniel J Sebald wrote:

emit octave_command_complete (QObject *requester, QString& command,
octave_value_list& result);


Aren't there problems with reference counting if you pass things
like an octave_value_list object from the Octave interpreter thread
to the GUI thread?


The atomic refcount I implemented a while back is supposed to be
thread-safe. I've been using it to pass octave objects between octave
and QtHandles and it seemed stable.

Yeah, but slow, as I recall. :-(

Can't one pass by reference after using:

  qRegisterMetaType<octave_value_list> ("octave_value_list");

?

That's not the problem. The problem is 2 thread trying to modifying the reference count at the same time. If you don't put any barrier, one thread might think the reference count is zero and delete the object, while another thread is incrementing the count.

Michael.


reply via email to

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