Re: commit: recursive locking

From: Patrick Lam (plam@plam.lcs.mit.edu)
Date: Tue Aug 06 2002 - 17:32:57 EDT

  • Next message: Patrick Lam: "Re: commit: recursive locking"

    On Mon, Aug 05, 2002 at 06:43:48AM -0700, Joaquin Cuenca Abela wrote:

    > > The mutex is static, so there's one which exists throughout the
    > > lifetime of the program.
    >
    > Not exactly. The *pointer* to your mutex was static,
    > not the mutex itself.

    Won't work. Thread system not yet initialized, so you can't create
    a mutex when the static constructors are running. But I put in the
    constructor 'if (!m_grLock) m_grLock = new UT_Mutex();' which almost
    does the same thing -- we get a race if we have two GR_Graphics created
    at once.

    > > e.g. I suspect that gdk_gc_set_line_attributes
    > > doesn't, but I don't
    > > know for sure. I will remove the lock around
    >
    > I guess that by now we can assume that a gdk call == X
    > call.

    I'll look at the source of gdk later.

    >
    > So you may want to just put the lock on the X non
    > layout units part.

    I'll do that.

    > > (What about _setColor?)
    >
    > I guess that it puts the color in the gc, so X call.

    May just be gdk only; wel'll see.

    pat



    This archive was generated by hypermail 2.1.4 : Thu Aug 08 2002 - 08:55:06 EDT