Another comment from David, he seems to have trouble with the https
To Richard's comment that we could adopt the GCC runtime solution: I wrote the
patch that did that in the GCC runtime originally, and it's what the GNUstep
runtime used to do. I fixed this behaviour because people rely on the Apple
behaviour - there are lots of fun deadlock scenarios you can get into from
only being able to enter one +initialize method at once in each thread.
Reverting to the old behaviour would just mean getting a different set of
potential deadlocks, and they would be deadlocks that a) only showed up on
GNUstep and not Cocoa, and b) made it hard to write code that was
deadlock-free on both Cocoa and GNUstep.
The second test case, however, does look like it shows a valid bug in GNUstep
if it actually does cause a deadlock. I can't reproduce this though. I've now
run the test over 5,000 times and can't reproduce the deadlock - the test
succeeded every time.