~cmiller/desktopcouch/segv-ya-rly

  • Committer: Chad Miller
  • Date: 2010-03-29 23:59:17 UTC
  • Revision ID: chad.miller@canonical.com-20100329235917-1dm6wj181cpbjeba
Since replication takes a long time (and we are not clever enough yet to 
replicate asynchronously), all replication is pushed into a subthread so
that don't block DBus server calls on getPort and such.

However, for some GUI libraries, GUI functions are not allowed to be outside
the main execution thread.  Violating that causes undefined behavior.

We need access to the keyring data in replication, and 'gnomekeyring' may
try to display an alert to the user, using GUI functions.  Doing so from 
inside the replication thread, outside the main thread, can cause SEGV 
crashes in deep and mysterious parts of Python and libraries it uses.

Now, add a wrapper for those functions that can call GUI functions.  First
test what environment we're in and if in a subthread, ask the twisted reactor
to run the target function in the main execution thread and return the values
down to the subthread.
Filename Latest Rev Last Changed Committer Comment Size
..
contacts 35.1.1 14 years ago Elliot Murphy Adding the contacts module. Diff
notes 63.2.1 14 years ago Rodrigo Moya Added basic notes record API to include NOTE_RECOR Diff
pair 2 14 years ago Elliot Murphy Initial release, under LGPLv3. Diff
records 2 14 years ago Elliot Murphy Initial release, under LGPLv3. Diff
replication_services 50.4.3 14 years ago Chad Miller Move all cloud services info into a subpackage tha Diff
tests 2 14 years ago Elliot Murphy Initial release, under LGPLv3. Diff
__init__.py 136 14 years ago Tarmac Revert feature of calling DBus on desktopcouch.fin 5.5 KB Diff Download File
local_files.py 140.1.2 14 years ago Chad Miller Expire old log files, to keep from using up lots o 13.1 KB Diff Download File
replication.py 123.3.6 14 years ago Chad Miller In do_all_replication(), use the port passed as a 10.3 KB Diff Download File
start_local_couchdb.py 140.1.2 14 years ago Chad Miller Expire old log files, to keep from using up lots o 9.3 KB Diff Download File
stop_local_couchdb.py 121.2.4 14 years ago Chad Miller Use a context to shut down, if provided. If none 1.3 KB Diff Download File