Follow-up Comment #1, bug #46956 (project gnustep):

(sorry for the formatting; don't know how to get bugzilla to preserve
indentation)

Part, but not all, of the problem is that parsingArguments is being protected
by the _lock ivar, but because parsingArguments is file static, and you can
have multiple NSUserDefaults objects in play, that's not sufficient. You need
to use classLock here.

But you can still end up with the second thread trying to call
_createArgumentDictionary getting a nil arguments dictionary. Since my
applications don't use that, I stopped there. I'll shortly be attaching a
patch that fixes that, and that adds a sleep-and-retry loop for the case where
some thread needs the standardUserDefaults but another thread is still in the
process of creating it. We probably need a similar sleep-and-retry loop for
_createArgumentDictionary but I didn't go that far because, as I said, I don't
use it.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?46956>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


_______________________________________________
Bug-gnustep mailing list
Bug-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to