I have a question regarding threads & Queues and how these relate to or
influence the main wxPython GUI thread.
I have several threads in my app - the main GUI thread, n (user tunable)
SQL worker threads that service a SQL job Queue, message objects placed
in the Queue has several attributes, a job (usually a SQL string),
originating window reference, dispatch function name etc. The same
scheme applies with a RAC (xml-rpc) server and associated Queue and
worker threads.
The SQL/RAC worker thread that executes the job sends a WorkerResponse
event to the originating window referenced in the message object using
wx.PostEvent on job completion. The reult of the job travels with the
event. So far so good, it works beautifully and effectively severs the
GUI from network latency issues.
I do, however, lack faith in this solution. If I pass a reference to a
object created and managed in one thread to another, doesn't it violate
the "separation" principle - wouldn't this potentially lead to some
subtle deadlock issues ? I thought I understood the issues involved but
lately I've been having some doubts - someone please educate me.
Sincerely
thys
ยทยทยท
--
The information contained in this communication is confidential and may be
legally privileged. It is solely for use of the individual or entity to whom
is addressed and others authorised to receive it. If you are not the intended
recipient you are hereby notified that any disclosure, copying, distribution
or taking of any action in reliance on the contents of this information is
strictly prohibited and may be unlawful.
This Message has been scanned for viruses and dangerous content by the NetSys
International Mail Scanner and is believed to be clean.