Re: [pygtk] Problem with threads
I already figured out. I called gtk.threads_init() and it works. :) thanks BR, David On 3/1/06, Brian <[EMAIL PROTECTED]> wrote: > On Sat, 2006-25-02 at 13:19 -0400, David Cohen wrote: > > Hi, > > > > I don't know if it is a problem with pygtk. I am trying to use thread > > (from threading module) on a program using als pygtk. I create the > > thread and pass a function as the target (mythread = > > threading.Thread(target = myfunc). Then I call the mythread.start() > > but the thread never really starts, just when I call the > > mythread.join() method. But it I do the samething without the pygtk, > > the thread works well. > > Dows anybody could help me? > > > > BR, > > > > David > > Did you call gtk.threads_init() first? > > -- > Brian <[EMAIL PROTECTED]> > > ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] Problem with threads
On Sat, 2006-25-02 at 13:19 -0400, David Cohen wrote: > Hi, > > I don't know if it is a problem with pygtk. I am trying to use thread > (from threading module) on a program using als pygtk. I create the > thread and pass a function as the target (mythread = > threading.Thread(target = myfunc). Then I call the mythread.start() > but the thread never really starts, just when I call the > mythread.join() method. But it I do the samething without the pygtk, > the thread works well. > Dows anybody could help me? > > BR, > > David Did you call gtk.threads_init() first? -- Brian <[EMAIL PROTECTED]> ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] Problem with threads
Selon David Cohen <[EMAIL PROTECTED]>: > Hi, Hello > I don't know if it is a problem with pygtk. I am trying to use thread > (from threading module) on a program using als pygtk. I create the > thread and pass a function as the target (mythread = > threading.Thread(target = myfunc). Then I call the mythread.start() > but the thread never really starts, just when I call the > mythread.join() method. But it I do the samething without the pygtk, > the thread works well. > Dows anybody could help me? > perhaps a search for "thread" in the FAQ ? http://www.async.com.br/faq/pygtk/index.py?querytype=simple&query=threads&req=search HTH nicolas -- Nicolas ROMAN Ingénieur Intégration/Développement Aliacom http://www.aliacom.fr [EMAIL PROTECTED] ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] Problem with threads
Hi, I don't know if it is a problem with pygtk. I am trying to use thread (from threading module) on a program using als pygtk. I create the thread and pass a function as the target (mythread = threading.Thread(target = myfunc). Then I call the mythread.start() but the thread never really starts, just when I call the mythread.join() method. But it I do the samething without the pygtk, the thread works well. Dows anybody could help me? BR, David ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] Problem with threads
> Hello, > > I have a problem with an application that use libglade and threads: > > My application open a root window which in turn open other windows on > user request. > When I start threads associated with other windows, there is a 10sec > freeze in the threads start() method (even if the thread dies > immediatly). > > I have properly initialized threading in gtk, and use gtk.threads_enter > and leave(). There is problably something I have done wrong but I can't > see where. > > Previous example given by James is working well. I am using python2.2.1 > on GNU/linux with pygtk1.99.10 and glade2 beta version. > > -- > Martin Chabot > Tachys Technologies > Sophia-Antipolis, France > > ___ > pygtk mailing list [EMAIL PROTECTED] > http://www.daa.com.au/mailman/listinfo/pygtk > Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ Well I found the answer: threading must be imported before gtk... -- Martin Chabot Tachys Technologies Sophia-Antipolis, France ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] Problem with threads
Hello, I have a problem with an application that use libglade and threads: My application open a root window which in turn open other windows on user request. When I start threads associated with other windows, there is a 10sec freeze in the threads start() method (even if the thread dies immediatly). I have properly initialized threading in gtk, and use gtk.threads_enter and leave(). There is problably something I have done wrong but I can't see where. Previous example given by James is working well. I am using python2.2.1 on GNU/linux with pygtk1.99.10 and glade2 beta version. -- Martin Chabot Tachys Technologies Sophia-Antipolis, France ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/