<br><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I would say that some functions aren't meant to be thread-safe and I<br>would qualify connection setup functions as such.
<br><br>You should finish setting up the connection (connect, handshake, set<br>timeout and watch callbacks) before any other thread gets to use the<br>connection.</blockquote><div><br> This isn't just used as a connection setup function, protected_change_timeout gets called every time you do a dbus_connection_send_with_reply -> _dbus_connection_attach_pending_call_unlocked -> _dbus_pending_call_add_timeout_unlocked -> protected_change_timeout.
<br><br>So if you do a dbus_connection_send_with_reply with multiple threads fast enough and often enough you will always see an "Out of Memory" error, since that is the way problems are reported. It's pretty simple to test, just make a bunch of threads that just repeat the same call over and over, eventually it will happen.
<br><br>Keith Preston<br><br><br><br></div><br></div><br>