Improve load in foreground

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25247 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2007-06-13 06:09:42 +00:00
parent 76a69ab66f
commit 94439e8926
3 changed files with 11 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2007-06-13 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSURLHandle.m: ([loadInForeground]) return as soon as load
is complete, rather than waiting for up to a second.
2007-06-12 Fred Kiefer <FredKiefer@gmx.de> 2007-06-12 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSPredicate.m: Fake like and matches by using * Source/NSPredicate.m: Fake like and matches by using

View file

@ -995,11 +995,13 @@ static NSComparisonResult tSort(GSIArrayItem i0, GSIArrayItem i1)
} }
/** /**
* Calls -acceptInputForMode:beforeDate: to run the loop once.<br /> * Calls -limitDateForMode: to determine if a timeout occurs before the
* specified date, then calls -acceptInputForMode:beforeDate: to run the
* loop once.<br />
* The specified date may be nil ... in which case the loop runs * The specified date may be nil ... in which case the loop runs
* until the limit date of the first input or timeout.<br /> * until the limit date of the first input or timeout.<br />
* If the specified date is in the past, runs the loop once only, to * If the specified date is in the past, this runs the loop once only,
* handle any events already available.<br /> * to handle any events already available.<br />
* If there are no input sources in mode, returns NO without running the loop, * If there are no input sources in mode, returns NO without running the loop,
* otherwise returns YES. * otherwise returns YES.
*/ */

View file

@ -481,7 +481,7 @@ static Class NSURLHandleClass = 0;
NSDate *limit; NSDate *limit;
limit = [[NSDate alloc] initWithTimeIntervalSinceNow: 1.0]; limit = [[NSDate alloc] initWithTimeIntervalSinceNow: 1.0];
[loop runUntilDate: limit]; [loop runMode: NSDefaultRunLoopMode beforeDate: limit];
RELEASE(limit); RELEASE(limit);
} }
return _data; return _data;