[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-dbus
Subject: Re: [python?] DBus + gtk + thread = problems
From: René 'Necoro' Neumann <lists () necoro ! eu>
Date: 2008-03-19 13:18:02
Message-ID: 47E1128A.7010405 () necoro ! eu
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Simon McVittie schrieb:
| On Wed, 19 Mar 2008 at 13:08:57 +0100, René 'Necoro' Neumann wrote:
|> I yesterday discovered a bug in dbus (or dbus-python) when using dbus
|> inside of a (py)gtk application: As an example, I create a window with a
|> button. When clicking the button, a new thread is started which runs a
|> dbus statement. (see attached example)
|
| You need to tell dbus-glib to initialize libdbus' thread locks, which
| you can do via:
|
| from dbus.mainloop.glib import threads_init
| threads_init()
|
| Otherwise, libdbus will have no thread locking, and will concurrently
| modify data in multiple threads. Don't let it do that.
|
| Simon
Hey - this is not fair =| ... I spent several hours with nailing down
the problem and creating proper backtraces - and then the solution is so
easy :)
Thanks - works ;)
- - Necoro
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFH4RKK4UOg/zhYFuARAq9jAJ9AnpFJJttLWNZYaO+973/sWnxQvgCbBJ8k
CRFg5ZxwPbYP3oRTD/PMKo0=
=5aoX
-----END PGP SIGNATURE-----
_______________________________________________
dbus mailing list
dbus@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dbus
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic