octave-maintainers
[Top][All Lists]
Advanced

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

Re: Passing variables up to the GUI


From: Daniel J Sebald
Subject: Re: Passing variables up to the GUI
Date: Sun, 14 Apr 2013 16:28:02 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

On 04/14/2013 04:17 PM, Daniel J Sebald wrote:
On 04/14/2013 03:19 PM, Michael Goffioul wrote:
[snip]
"Later" is irrelevant here. With multithreaded app, both destructors can
happen at the same time, concurrently.

But when is that in the QThread environment? Not generally speaking in
the OS environment. The important thing here is the signal/slot
mechanism. It may be that in order for this to operate properly, the Qt
programmers took an approach whereby the constructor-copy and delete are
done in the same thread. For example

GUI issued signal
   copy object in GUI thread
   call all slots in the Worker thread
   delete object in the GUI thread

Worker issue signal
   copy object in the Worker thread
   call all slots in the GUI thread
   delete object in the Worker thread

I just thought that in fact it can be a mix of connections and more complicated:

Worker issue signal
  call all slots in the Worker thread using direct?
  copy object in the Worker thread
  call all slots in the GUI thread using queuing?
  delete object where????

Point being that it is complex enough to make one wonder where exactly the copy/delete is done and whether Qt programmers had to so something very safe inside of this signal/slot mechanism.

Dan




reply via email to

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