https://bugs.freedesktop.org/show_bug.cgi?id=66025

--- Comment #40 from David Bolen <db3l....@gmail.com> ---
Created attachment 82928
  --> https://bugs.freedesktop.org/attachment.cgi?id=82928&action=edit
Patch without use of sentinel

(In reply to comment #37)

> Another thing that made me wonder is:  I assume that _uno_import will never
> be called by multiple threads in parallel, anyway, or else the "d[x] =
> unknown" and "del d[x]" might introduce a new race there.

It should be safe - the Python import lock prevents two threads from importing
simultaneously (and possibly seeing partial modules).  In retrospect, it
appears more complicated than necessary, and your uncertainty could be shared
by future viewers.  A simple flag set at the bottom of each exception path
works just as well.

This patch (via git format-patch) uses that approach.  It's off of the current
master and incorporates the patch2 change since that wasn't there yet).  I'll
look into gerrit for the future when I have a chance.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to