bug-gnustep
[Top][All Lists]
Advanced

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

[bug #39126] NSConditionLock -lockWhenCondition:beforeDate: bug


From: Cameron Pulsford
Subject: [bug #39126] NSConditionLock -lockWhenCondition:beforeDate: bug
Date: Thu, 30 May 2013 19:18:50 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/536.30.1 (KHTML, like Gecko) Version/6.0.5 Safari/536.30.1

URL:
  <http://savannah.gnu.org/bugs/?39126>

                 Summary: NSConditionLock -lockWhenCondition:beforeDate: bug
                 Project: GNUstep
            Submitted by: cpulsford
            Submitted on: Thu 30 May 2013 07:18:49 PM GMT
                Category: Base/Foundation
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

I'm running gnustep-base v1.24.4 with gcc v4.7.2 on debian wheezy and an intel
celeron processor.

I have attached a program that waits on a lock condition for 5 seconds. The
condition is set appropriately on a separate thread 10 seconds later, so the
-lockWhenCondition:beforeDate: call should fail after 5 seconds.


Here is the output when run in Xcode:

2013-05-30 15:00:55.889 test[28892:707] Attempting lock...
2013-05-30 15:01:00.890 test[28892:707] Done trying to lock, success: NO

-lockWhenCondition:beforeDate waits for 5 seconds, can not acquire the lock
and gives up.

When run under GNUstep I get this output:

2013-05-30 15:10:56.658 test[31668] Attempting lock...
2013-05-30 15:11:06.643 test[31668] Done trying to lock, success: YES

-lockWhenCondition:beforeDate: ends up waiting 10 seconds and returns YES,
where it should only wait 5 seconds and return NO.

I added some debug logs in the NSLock.m source file, and it looks like there
is something strange happening with the _condition (NSCondition) ivar but I am
not familiar enough to say one way or another.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 30 May 2013 07:18:49 PM GMT  Name: LockTest.zip  Size: 2kB   By:
cpulsford

<http://savannah.gnu.org/bugs/download.php?file_id=28212>

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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