mirror of
https://github.com/gnustep/libs-performance.git
synced 2025-02-19 10:01:20 +00:00
Remove exception handler block that just would incorrectly unlock a lock
This commit is contained in:
parent
bc8e65e380
commit
941c6e70aa
2 changed files with 16 additions and 30 deletions
|
@ -1,3 +1,7 @@
|
|||
2023-01-25 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* GSCache.m: Remove erroneous unlock in exception handler.
|
||||
|
||||
2023-01-20 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* GSLinkedList.h: The produce and consume functins of a link store
|
||||
|
|
42
GSCache.m
42
GSCache.m
|
@ -348,21 +348,12 @@ static void removeItem(GSCacheItem *item, GSCacheItem **first)
|
|||
GSCacheItem *orig = [item retain];
|
||||
|
||||
[my->lock unlock];
|
||||
NS_DURING
|
||||
{
|
||||
keep = (*(my->replace))(my->delegate,
|
||||
@selector(shouldKeepItem:withKey:lifetime:after:),
|
||||
item->object,
|
||||
aKey,
|
||||
item->life,
|
||||
when - item->when);
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
[my->lock unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER
|
||||
keep = (*(my->replace))(my->delegate,
|
||||
@selector(shouldKeepItem:withKey:lifetime:after:),
|
||||
item->object,
|
||||
aKey,
|
||||
item->life,
|
||||
when - item->when);
|
||||
[my->lock lock];
|
||||
if (keep == YES)
|
||||
{
|
||||
|
@ -424,21 +415,12 @@ static void removeItem(GSCacheItem *item, GSCacheItem **first)
|
|||
GSCacheItem *current;
|
||||
|
||||
[my->lock unlock];
|
||||
NS_DURING
|
||||
{
|
||||
(*(my->refresh))(my->delegate,
|
||||
@selector(mayRefreshItem:withKey:lifetime:after:),
|
||||
item->object,
|
||||
aKey,
|
||||
item->life,
|
||||
when - item->when);
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
[my->lock unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER
|
||||
(*(my->refresh))(my->delegate,
|
||||
@selector(mayRefreshItem:withKey:lifetime:after:),
|
||||
item->object,
|
||||
aKey,
|
||||
item->life,
|
||||
when - item->when);
|
||||
[my->lock lock];
|
||||
|
||||
/* Refetch in case delegate changed it.
|
||||
|
|
Loading…
Reference in a new issue