mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
Improve perform in other threads
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27520 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
aa26b4ea10
commit
49dfed3d80
5 changed files with 29 additions and 4 deletions
|
@ -1129,9 +1129,18 @@ static inline BOOL timerInvalidated(NSTimer *t)
|
|||
GSPrivateNotifyIdle();
|
||||
/*
|
||||
* Pause for as long as possible (up to the limit date)
|
||||
* Call the polling method so we notice thread notifications
|
||||
* that methods should be performed in this loop.
|
||||
*/
|
||||
[NSThread sleepUntilDate: limit_date];
|
||||
ti = [limit_date timeIntervalSinceNow];
|
||||
if (context == nil)
|
||||
{
|
||||
context = [[GSRunLoopCtxt alloc] initWithMode: mode
|
||||
extra: _extra];
|
||||
NSMapInsert(_contextMap, context->mode, context);
|
||||
RELEASE(context);
|
||||
}
|
||||
[context pollUntil: (int)(ti * 1000) within: nil];
|
||||
GSPrivateCheckTasks();
|
||||
if (context != nil)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue