mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +00:00
Complete documentation.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@16375 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
820ca85970
commit
55417b22c7
1 changed files with 31 additions and 12 deletions
|
@ -198,8 +198,8 @@ GSCurrentThreadDictionary()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the run loop for the specified thread (or, if t is nil,
|
* Returns the runloop for the specified thread (or, if t is nil,
|
||||||
* for the current thread). Creates a new run loop if necessary.<br />
|
* for the current thread). Creates a new runloop if necessary.<br />
|
||||||
* Returns nil on failure.
|
* Returns nil on failure.
|
||||||
*/
|
*/
|
||||||
NSRunLoop*
|
NSRunLoop*
|
||||||
|
@ -250,6 +250,17 @@ gnustep_base_thread_callback()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class encapsulates OpenStep threading. See [NSLock] and its
|
||||||
|
* subclasses for handling synchronisation between threads.<br />
|
||||||
|
* Each process begins with a main thread and additional threads can
|
||||||
|
* be created using NSThread. The GNUstep implementation of OpenStep
|
||||||
|
* has been carefully designed so that the internals of the base
|
||||||
|
* library do not use threading (except for methods which explicitly
|
||||||
|
* deal with threads of course) so that you can write applications
|
||||||
|
* without threading. Non-threaded applications re more efficient
|
||||||
|
* (no locking is required) and are easier to debug during development.
|
||||||
|
*/
|
||||||
@implementation NSThread
|
@implementation NSThread
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -592,9 +603,9 @@ gnustep_base_thread_callback()
|
||||||
* This class performs a dual function ...
|
* This class performs a dual function ...
|
||||||
* <p>
|
* <p>
|
||||||
* As a class, it is responsible for handling incoming events from
|
* As a class, it is responsible for handling incoming events from
|
||||||
* the main run loop on a special inputFd. This consumes any bytes
|
* the main runloop on a special inputFd. This consumes any bytes
|
||||||
* written to wake the main run loop.<br />
|
* written to wake the main runloop.<br />
|
||||||
* During initialisation, the default run loop is set up to watch
|
* During initialisation, the default runloop is set up to watch
|
||||||
* for data arriving on inputFd.
|
* for data arriving on inputFd.
|
||||||
* </p>
|
* </p>
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -796,6 +807,13 @@ static NSDate *theFuture;
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extra methods to permit messages to be sent to an object such that they
|
||||||
|
* are executed in the <em>main</em> thread.<br />
|
||||||
|
* The main thread is the thread in which the GNUstep system is started,
|
||||||
|
* and where the GNUstep gui is used, it is the thread in which gui
|
||||||
|
* drawing operations <strong>must</strong> be performed.
|
||||||
|
*/
|
||||||
@implementation NSObject (NSMainThreadPerformAdditions)
|
@implementation NSObject (NSMainThreadPerformAdditions)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -807,22 +825,23 @@ static NSDate *theFuture;
|
||||||
* runs in one of the modes specified in anArray.<br />
|
* runs in one of the modes specified in anArray.<br />
|
||||||
* Where this method has been called more than once before the runloop
|
* Where this method has been called more than once before the runloop
|
||||||
* of the main thread runs in the required mode, the order in which the
|
* of the main thread runs in the required mode, the order in which the
|
||||||
* 'perform' operations in the main thread is done is the same as that
|
* operations in the main thread is done is the same as that in which
|
||||||
* in which they were added.<br />
|
* they were added using this method.
|
||||||
* If there are no modes in anArray,
|
* </p>
|
||||||
|
* <p>If there are no modes in anArray,
|
||||||
* the method has no effect and simply returns immediately.
|
* the method has no effect and simply returns immediately.
|
||||||
* </p>
|
* </p>
|
||||||
* <p>The argument aFlag specifies whether the method should wait until
|
* <p>The argument aFlag specifies whether the method should wait until
|
||||||
* the selector has been performed before returning.<br />
|
* the selector has been performed before returning.<br />
|
||||||
* <strong>NB.</strong> This method does <em>not</em> cause the run loop of
|
* <strong>NB.</strong> This method does <em>not</em> cause the runloop of
|
||||||
* the main thread to be run ... so if the run loop is not executed by some
|
* the main thread to be run ... so if the runloop is not executed by some
|
||||||
* code in the main thread, the thread waiting for the perform to complete
|
* code in the main thread, the thread waiting for the perform to complete
|
||||||
* will block forever.
|
* will block forever.
|
||||||
* </p>
|
* </p>
|
||||||
* <p>As a special case, if aFlag == YES and the current thread is the main
|
* <p>As a special case, if aFlag == YES and the current thread is the main
|
||||||
* thread, the modes array is ignord and the selector is performed immediately.
|
* thread, the modes array is ignored and the selector is performed immediately.
|
||||||
* This behavior is necessary to avoid the main thread being blocked by
|
* This behavior is necessary to avoid the main thread being blocked by
|
||||||
* waiting for a perform which will never happen because the run loop is
|
* waiting for a perform which will never happen because the runloop is
|
||||||
* not executing.
|
* not executing.
|
||||||
* </p>
|
* </p>
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue