mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +00:00
changes from bug #40930
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37478 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
48bdc3800c
commit
15e7c8f897
4 changed files with 26 additions and 6 deletions
|
@ -710,12 +710,9 @@ static inline BOOL timerInvalidated(NSTimer *t)
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the run loop instance for the current thread.
|
||||
*/
|
||||
+ (NSRunLoop*) currentRunLoop
|
||||
+ (NSRunLoop*) _runLoopForThread: (NSThread*) aThread
|
||||
{
|
||||
GSRunLoopThreadInfo *info = GSRunLoopInfoForThread(nil);
|
||||
GSRunLoopThreadInfo *info = GSRunLoopInfoForThread(aThread);
|
||||
NSRunLoop *current = info->loop;
|
||||
|
||||
if (nil == current)
|
||||
|
@ -772,6 +769,16 @@ static inline BOOL timerInvalidated(NSTimer *t)
|
|||
return current;
|
||||
}
|
||||
|
||||
+ (NSRunLoop*) currentRunLoop
|
||||
{
|
||||
return [self _runLoopForThread: nil];
|
||||
}
|
||||
|
||||
+ (NSRunLoop*) mainRunLoop
|
||||
{
|
||||
return [self _runLoopForThread: [NSThread mainThread]];
|
||||
}
|
||||
|
||||
- (id) init
|
||||
{
|
||||
DESTROY(self);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue