[wxPython-users] calling wx.CallAfter after wx.Frame.Destroy

Aaron Brady castironpi at comcast.net
Tue Jan 22 13:02:13 PST 2008


> > However, if you block on MyCallAfterFunction's turn in the event queue,
> a
> > previously posted and sunk event, which blocks on the same
> synchronization
> > object, halts the queue, deadlocking it.
> 
> Well, yes.  However you could have that problem regardless of whether
> the frame is being destroyed or not, or if MainLoop is exiting.
> 
> Patient: "Doctor, my arm hurts when I move it like this, what should I
> do?"
> Doctor: "Don't move your arm like that."

I'm still thinking smaller chunks.

def YourFunction( event ):
	if not frame: return
	#otherwise, you have control of the GUI thread.

Note: CallAfter does not guarantee its parameter will be called.




More information about the wxpython-users mailing list