bug-gnustep
[Top][All Lists]
Advanced

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

[bug #35263] libobjc2 can enter a deadlock during dtable initialization


From: Niels Grewe
Subject: [bug #35263] libobjc2 can enter a deadlock during dtable initialization
Date: Thu, 19 Jan 2012 13:49:53 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0

Follow-up Comment #7, bug #35263 (project gnustep):

Hi guys,

Just some thoughts on this: Having per class locks for +initialize is not only
the Apple compatible behaviour, but imho also a contract that is easier to
honour: You just have to keep the set of classes being initialized in thread A
disjoint from those you send messages to from thread B (and vice-versa).
And while I agree that this can be quite tedious for a complex application,
it's even worse with the GCC runtime: If you only got the global lock, you
have to make sure that every single class that might potentially receive
messages in another thread is initialized before you go multi-threaded, which
really isn't feasible at all for a non-trivial application. 

For example, in DBusKit I need a whole pile of code that postpones creation of
a worker thread until all +initialize methods in the related DBusKit classes
have run just to work around this limitation of the GCC runtime. Not a single
line of this stuff is actually required with libobjc2.  

Cheers,

Niels

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]