Author: rfm
Date: Sun Mar 22 08:39:14 2015
New Revision: 38418
URL: http://svn.gna.org/viewcvs/gnustep?rev=38418&view=rev
Log:
fix use of pandingFlush
Modified:
libs/ec/trunk/EcLogger.m
Modified: libs/ec/trunk/EcLogger.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/ec/trunk/EcLogger.m?rev=38418&r1=38417&r2=38418&view=diff
==============================================================================
--- libs/ec/trunk/EcLogger.m (original)
+++ libs/ec/trunk/EcLogger.m Sun Mar 22 08:39:14 2015
@@ -426,6 +426,7 @@
* a flush real soon.
*/
[lock lock];
+ pendingFlush = NO;
if (reset != nil)
{
if (timer != nil && [[timer fireDate] timeIntervalSinceNow] > 0.001)
@@ -487,7 +488,11 @@
[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 @@
/*
* 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
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs