how to run two objects in independent threads?

Hello everyone,

Is there an example program that might help me learn how to run to different
frames simultaneously? I would like frame and frame2 to be able to execute
simultaneously doing independent tasks. The two objects need to run in
independent threads so they may do simultaneous but independent tasks.

*For example:
    class MyApp(wx.wxApp):
        def OnInit(self):
            frame = AppFrame(wx.NULL, -1, "12/29/2003")
            frame.Show(True)
            self.SetTopWindow(frame)

            frame2 = AppFrame(wx.NULL, -1, "1/19/2004")
            frame2.Show(True)
            self.SetTopWindow(frame2)
            return True

Any input be greatly appreciated,

Todd

You do not need threads to have lots of active frames, in fact you have to
do most GUI object operations on the main thread. The frames run for a
very short time in response to events. You will need worker threads if
the data you generate to put in the frames takes a long time to create.
You can send events from the worker threads to the main thread and update
the display.

Barry

···

At 17-01-2004 12:44, Todd G. Gardner wrote:

Hello everyone,

Is there an example program that might help me learn how to run to different
frames simultaneously? I would like frame and frame2 to be able to execute
simultaneously doing independent tasks. The two objects need to run in
independent threads so they may do simultaneous but independent tasks.