<div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div class="Wj3C7c">Javier Derderian wrote:<br>
|<br>
| Hi!<br>
|<br>
|<br>
| You need to be aware of how it may affect the application's<br>
| responsiveness: bzrlib is an synchronous API, meaning that when it<br>
| takes a long time to complete a command, it prevents anything else<br>
| from running in the same thread.<br>
|<br>
|<br>
| I'm planning to integrate bzr progress indicators in this plugin, and that<br>
| makes the "waiting" much smoother, i think.<br>
| Anyway, I'll also do some test running bzr commands inside threads<br>
| to allow gedit to keep working. But since the commands that took<br>
| loonger (pull, push, etc) have a dialog and that dialog is modal<br>
| it may not be a bad idea to just work with the progress indicator.<br>
|<br>
| --<br>
| Javier Derderian<br></div></div>
| <a href="mailto:javierder@gmail.com" target="_blank">javierder@gmail.com</a> <mailto:<a href="mailto:javierder@gmail.com" target="_blank">javierder@gmail.com</a>><div class="Ih2E3d"><br>
| ---<br>
| En la Alegría serás Imbatible<br>
<br></div>
I know there are a few places inside bzrlib that are explicitly not threadsafe.<br>
I've encountered it mostly through the ui_factory.get_nested_progress().<br>
Specifically, it assumes that it grows as a simple stack, and the last process<br>
to be started is the first to call .finished().<br>
<br>
A lot of the code is probably thread safe, but the UI code is not. It might be<br>
possible to write your own ui_factory which was thread safe, which would then<br>
not cause this problem.<br>
<br>
Just letting you know what I've run into.<br>
<br>
John<br>
=:-><br>
</blockquote><div><br>Hi!<br><br>I've been already playing working with my own ui_factory, taking code from<br>bzr-gtk own ui_factory and integrating it with my plugin, and it seemed to work<br>just fine.<br>Anyway, i have to do more tests with threads.<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.9 (Cygwin)<br>
Comment: Using GnuPG with Mozilla - <a href="http://enigmail.mozdev.org" target="_blank">http://enigmail.mozdev.org</a><br>
<br>
iEYEARECAAYFAkgOPwAACgkQJdeBCYSNAAP+mACgjismFIyzCCQSiJfioK5OVlgH<br>
PMEAn1FFESxDS33B2SA9awXBYDp2+tZL<br>
=kWCB<br>
-----END PGP SIGNATURE-----<br>
</blockquote></div><br><br clear="all"><br>-- <br>Javier Derderian<br><a href="mailto:javierder@gmail.com">javierder@gmail.com</a><br>---<br>En la Alegría serás Imbatible