Josiah Carlson <[EMAIL PROTECTED]> wrote:
> Nick Craig-Wood wrote:
> > I'd dispute that. If you are communicating between threads use a
> > Queue and you will save yourself thread heartache. Queue has a non
> > blocking read interface Queue.get_nowait().
>
> If you have one producer and one co
Nick Craig-Wood wrote:
> Josiah Carlson <[EMAIL PROTECTED]> wrote:
>> Sending results one at a time to the GUI is going to be slow for any
>> reasonably fast search engine (I've got a pure Python engine that does
>> 50k results/second without breaking a sweat). Don't do that. Instead,
>> h
Josiah Carlson <[EMAIL PROTECTED]> wrote:
> Sending results one at a time to the GUI is going to be slow for any
> reasonably fast search engine (I've got a pure Python engine that does
> 50k results/second without breaking a sweat). Don't do that. Instead,
> have your search thread create
On Jul 18, 3:41 am, Benjamin <[EMAIL PROTECTED]> wrote:
> I'm writing a search engine in Python with wxPython as the GUI. I have
> the actual searching preformed on a different thread from Gui thread.
> It sends it's results through a Queue to the results ListCtrl which
> adds a new item. This work
Benjamin wrote:
> I'm writing a search engine in Python with wxPython as the GUI. I have
> the actual searching preformed on a different thread from Gui thread.
> It sends it's results through a Queue to the results ListCtrl which
> adds a new item. This works fine or small searches, but when the
>
Sounds like a race condition. is List Ctrl waiting for the gui to return?
Maybe make the processing more then one thread!
On 7/17/07, Stef Mientki <[EMAIL PROTECTED]> wrote:
Benjamin wrote:
> I'm writing a search engine in Python with wxPython as the GUI. I have
> the actual searching preformed
Benjamin wrote:
> I'm writing a search engine in Python with wxPython as the GUI. I have
> the actual searching preformed on a different thread from Gui thread.
> It sends it's results through a Queue to the results ListCtrl which
> adds a new item. This works fine or small searches, but when the
>
I'm writing a search engine in Python with wxPython as the GUI. I have
the actual searching preformed on a different thread from Gui thread.
It sends it's results through a Queue to the results ListCtrl which
adds a new item. This works fine or small searches, but when the
results number in the hun
David E. Konerding DSD staff wrote:
> http://wxwidgets.org/manuals/2.6.1/wx_threadfunctions.html#threadfunctions
>
> This strongly suggests you can arbitrarily grab the wx GUI lock and call GUI
> functions from any thread. It's still voodoo. But we're adults here, and
> practicing
> voodoo isn'
On 2005-08-10, Peter Hansen <[EMAIL PROTECTED]> wrote:
> David E. Konerding DSD staff wrote:
>> Further, calling wx from a thread other than the one running the event
> > loop is deep voodoo and should typically be avoided.
>
> "Typically"? Let's just say "always" and maybe use the phrase "certai
On 2005-08-10, Bryan Olson <[EMAIL PROTECTED]> wrote:
> > The easiest approach, though, is to use the threadedselectreactor in
> Twisted (you need
> > to check the HEAD branch out with subversion, because that reactor
> isn't included in any releases).
> > With threadedselectreactor, it's easy to
David E. Konerding DSD staff wrote:
> The easiest approach, though, is to use the threadedselectreactor in Twisted
> (you need
> to check the HEAD branch out with subversion, because that reactor isn't
> included in any releases).
> With threadedselectreactor, it's easy to incorporate both the GU
Peter Hansen wrote:
> David E. Konerding DSD staff wrote:
>> Further, calling wx from a thread other than the one running the
>> event loop is deep voodoo and should typically be avoided.
>
> "Typically"? Let's just say "always" and maybe use the phrase "certain
> to corrupt wx and crash the
thanks for all these advices.
I think a custom event will be the way to go.
for the moment I use something _really_ ugly : a mix between GUI,
threads and recursive fonctions.
--
http://mail.python.org/mailman/listinfo/python-list
David E. Konerding DSD staff wrote:
> Further, calling wx from a thread other than the one running the event
> loop is deep voodoo and should typically be avoided.
"Typically"? Let's just say "always" and maybe use the phrase "certain
to corrupt wx and crash the app" instead of "deep voodoo".
David E. Konerding DSD staff wrote:
[...]
> You need another way to pass completion information between the
downloader
> thread and the main thread; the simplest way is to define a custom wx
> Event, and wxPostEvent from the downloader thread when it completes (
> and when the gauge should be
In article <[EMAIL PROTECTED]>, perchef wrote:
> Hi,
>
> I have several files to download and a GUI to update. I know this is a
> frequently asked question but i can't find an appropriate solution.
> My Downloader extends threading.Thread and update a wx.Gauge in GUI
> during the process.
>
> for
Hi,
I have several files to download and a GUI to update. I know this is a
frequently asked question but i can't find an appropriate solution.
My Downloader extends threading.Thread and update a wx.Gauge in GUI
during the process.
for src in urls:
downloader = Downloader( src, destination,
On Wed, 22 Jun 2005 09:28:31 -0400, Peter Hansen wrote:
> Almost certainly it is. It would be simplest to set up a worker thread
> once, when the GUI thread begins, and simply send requests to it via a
> Queue. It can create the socket, connect to the server, communicate,
> close it down, an
Zunbeltz Izaola wrote:
> I opened the socket once (i don't know if
> itit is important to open inside or outside the comunication thread).
I don't believe it is important where it is opened, provided you don't
try to do things with it from two threads at a time (without adequate
protection).
>
On Tue, 21 Jun 2005 11:07:35 -0400, Peter Hansen wrote:
>
> Please clarify: what does this mean? "Sending a socket" is not a usual
> way to describe TCP communications. Do you mean your program _opens_ a
> socket (like a phone connection) and _sends_ some data, then waits for
> data to be re
Zunbeltz Izaola wrote:
> I'm developing a GUI program (wxPython). This program has to comunicate
> (TCP) whit other program that controls a laboratory machine to do a
> measurement. I have a dialog box, wiht two buttoms "Start measurement" and
> "Stop". "Start" executes a function that do the measu
On Tue, 21 Jun 2005 15:30:41 +0100, Toby Dickenson wrote:
> On Tuesday 21 June 2005 14:22, Zunbeltz Izaola wrote:
>
>
> I guess you are accessing the socket from both your GUI thread and
> communications thread. Dont do that. An action in the GUI thread should
> signal the communictions thread
On Tuesday 21 June 2005 14:22, Zunbeltz Izaola wrote:
> This comunication is done in a new thread not to frezee the GUI.
> The problem is that when "Stop" is done (it kills the thread) some
> confirmation sockets are mixed (are not receibed in the correct order
> although i use tcp).
I guess you
Hi,
I have the following problem.
I'm developing a GUI program (wxPython). This program has to comunicate
(TCP) whit other program that controls a laboratory machine to do a
measurement. I have a dialog box, wiht two buttoms "Start measurement" and
"Stop". "Start" executes a function that do the
25 matches
Mail list logo