Sync problems when writing a Nautilus extension



Hello esteemed members of the Nautilus mailing list,

For the past few days, I've been working on a nautilus extension to
allow a user to integrate more closely with a Mercurial repository. One
of the features I plan on implementing is various emblems showing the
status of each of the files in the repository (untracked, modified,
added, etc).  In order to do this, my extension parses the output of
"hg status" using a separate thread to increase user responsiveness.
The problem I'm having is this:  Although I use things like mutexes and
condition variables, my extension locks nautilus up.  The strange thing
is that it locks up on a call to g_object_set_data;  if I remove this
call, it locks up on a call to g_hash_table_insert.  Either one of two
things is true, I think:

1) I was not able to properly synchronize my extension.
2) GHashTable/GObject do some freaky behind-the-scenes stuff that's
causing my extension to lock up Nautilus.

If the second is true, I'd love to hear any suggestions on how I
can fix it.  Either way, if someone could have a look at my code and
give me a hand, I'd really appreciate it.  My code is at
http://cs.wisc.edu/~hoelz/mercurial-nautilus.tar.gz;  I've included the
whole thing, but the only *really* important file is status-cache.c,
and the lines it's blocking on are 180 and 182.  I also apologize in
advance for the condition of my code at the moment; it's full of
do-this and do-that comments and it's not really ready to be seen by
the world. =P

Thanks a ton,
Rob Hoelz



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]