2008/11/20 Linas Vepstas <[EMAIL PROTECTED]>:

> -- The reason for dropping the heap_mutex before grabbing
> the other lock (for example  scm_i_port_table_mutex),
> is somewhat obscure, but at one point I decided that this
> was OK, and arguably correct.  As I write this, I've
> forgotten why. However, this should be a focus of attention,
> and re-thought-out.

Well, a quick look reminds me of the situation: in many/most
cases, locked sections might trigger garbage collection.
Thus, the heap_mutex *must* be dropped before the lock
is taken.

My gut impression is that this is a poor design point; and
that the correct thing to do would be make locks fine-grained,
so that there is never a need to run GC while a lock is held.
This would require extensive auditing of the guile code.

--linas


Reply via email to