bug-gnustep
[Top][All Lists]
Advanced

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

Re: performSelectorOnMainThread: bug (with patch)


From: Richard Frith-Macdonald
Subject: Re: performSelectorOnMainThread: bug (with patch)
Date: Sun, 8 Dec 2002 20:18:40 +0000


On Sunday, December 8, 2002, at 02:13  pm, Philip Derrin wrote:

Hi,

When trying to use -performSelectorOnMainThread:withObject:
waitUntilDone:, I get the following error message:

"Uncaught exception NSConditionLockException, reason: Thread attempted to
recursively lock"

Apparently there's a race condition in GSPerformHolder. As soon as it
unlocks its condition lock in -fire, the other thread gets the lock and
releases the GSPerformHolder, which then tries to acquire the lock again
in -dealloc.

The attached patch to [GSPerformHolder fire] in NSThread.m should fix it.

Thanks, I applied your fix.




reply via email to

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