mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Fixed task notification problem in nsrunloop
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@10219 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
70d49d8d1d
commit
ddbf0da92f
4 changed files with 120 additions and 22 deletions
|
@ -50,6 +50,7 @@
|
|||
static int debug_run_loop = 0;
|
||||
static NSDate *theFuture = nil;
|
||||
|
||||
extern BOOL GSCheckTasks();
|
||||
|
||||
|
||||
/*
|
||||
|
@ -1016,7 +1017,6 @@ const NSMapTableValueCallBacks ArrayMapValueCallBacks =
|
|||
- (void) acceptInputForMode: (NSString*)mode
|
||||
beforeDate: limit_date
|
||||
{
|
||||
extern BOOL GSCheckTasks();
|
||||
NSTimeInterval ti;
|
||||
struct timeval timeout;
|
||||
void *select_timeout;
|
||||
|
@ -1059,6 +1059,7 @@ const NSMapTableValueCallBacks ArrayMapValueCallBacks =
|
|||
{
|
||||
/* The LIMIT_DATE has already past; return immediately without
|
||||
polling any inputs. */
|
||||
GSCheckTasks();
|
||||
[self _checkPerformers];
|
||||
GSNotifyASAP();
|
||||
if (debug_run_loop)
|
||||
|
@ -1352,6 +1353,13 @@ const NSMapTableValueCallBacks ArrayMapValueCallBacks =
|
|||
{
|
||||
printf ("\tNSRunLoop run mode with date already past\n");
|
||||
}
|
||||
/*
|
||||
* Notify if any tasks have completed.
|
||||
*/
|
||||
if (GSCheckTasks() == YES)
|
||||
{
|
||||
GSNotifyASAP();
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
@ -1363,6 +1371,13 @@ const NSMapTableValueCallBacks ArrayMapValueCallBacks =
|
|||
{
|
||||
printf ("\tNSRunLoop run mode with nothing to do\n");
|
||||
}
|
||||
/*
|
||||
* Notify if any tasks have completed.
|
||||
*/
|
||||
if (GSCheckTasks() == YES)
|
||||
{
|
||||
GSNotifyASAP();
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue