mirror of
https://github.com/gnustep/libs-ec.git
synced 2025-02-23 03:41:23 +00:00
fix use of pandingFlush
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/ec/trunk@38418 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0921c71c66
commit
c658e5c1c3
1 changed files with 13 additions and 5 deletions
18
EcLogger.m
18
EcLogger.m
|
@ -426,6 +426,7 @@ static NSArray *modes;
|
|||
* a flush real soon.
|
||||
*/
|
||||
[lock lock];
|
||||
pendingFlush = NO;
|
||||
if (reset != nil)
|
||||
{
|
||||
if (timer != nil && [[timer fireDate] timeIntervalSinceNow] > 0.001)
|
||||
|
@ -487,7 +488,11 @@ static NSArray *modes;
|
|||
[message appendString: text];
|
||||
if ([message length] >= size || (interval > 0.0 && timer == nil))
|
||||
{
|
||||
shouldFlush = YES;
|
||||
if (NO == pendingFlush)
|
||||
{
|
||||
shouldFlush = YES;
|
||||
pendingFlush = YES;
|
||||
}
|
||||
}
|
||||
[lock unlock];
|
||||
|
||||
|
@ -586,10 +591,13 @@ static NSArray *modes;
|
|||
/*
|
||||
* Ensure new values take effect real soon.
|
||||
*/
|
||||
[self performSelectorOnMainThread: @selector(_scheduleFlush:)
|
||||
withObject: self
|
||||
waitUntilDone: NO
|
||||
modes: modes];
|
||||
if (NO == pendingFlush)
|
||||
{
|
||||
[self performSelectorOnMainThread: @selector(_scheduleFlush:)
|
||||
withObject: self
|
||||
waitUntilDone: NO
|
||||
modes: modes];
|
||||
}
|
||||
}
|
||||
}
|
||||
@end
|
||||
|
|
Loading…
Reference in a new issue