@@ -170,10 +170,13 @@ GS_EXPORT_CLASS
170170 */
171171- (id ) init ;
172172
173- /* * Initialises the receiver to send the message aSelector to the object aTarget
174- * with the argument anArgument (which may be nil).<br />
173+ /* * Initialises the receiver to send the message aSelector to the object
174+ * aTarget with the argument anArgument (which may be nil).<br />
175175 * The arguments aTarget and aSelector are retained while the thread is
176- * running.
176+ * running.<br />
177+ * The method implementation of aSelector is responsible for creating and
178+ * destroying an autorelease pool if it uses (either directly or indirectly)
179+ * any code with autoreleases.
177180 */
178181- (id ) initWithTarget : (id )aTarget
179182 selector : (SEL )aSelector
@@ -199,7 +202,9 @@ GS_EXPORT_CLASS
199202 */
200203- (BOOL ) isMainThread ;
201204
202- /* * FIXME ... what does this do?
205+ /* * Do not call this directly. This method is called to send the message
206+ * that the receiver was initialised with at the point when the thread
207+ * starts executing.
203208 */
204209- (void ) main ;
205210
@@ -353,8 +358,8 @@ GS_EXPORT_CLASS
353358 *
354359 * If you use them, make sure you initialize the NSThread class inside
355360 * (what you consider to be your) main thread, before registering any
356- * other thread. To initialize NSThread, simply call GSCurrentThread
357- * (). The main thread will not need to be registered.
361+ * other thread. To initialize NSThread, simply call GSCurrentThread().
362+ * The main thread will not need to be registered.
358363 */
359364
360365/*
@@ -400,11 +405,10 @@ GS_EXPORT void GSUnregisterCurrentThread (void);
400405
401406#endif
402407
403- /* *
404- * This category contains convenience
405- * initialisers and methods for executing
406- * blocks in different threads and creating
407- * NSThread objects with a block as entry point.
408+ /* * This category contains convenience initialisers and methods for executing
409+ * blocks in different threads and creating NSThread objects with a block as
410+ * entry point.
411+ * The use of these methods is not portable between compilers!
408412 */
409413@interface NSThread (BlockAdditions)
410414
@@ -414,9 +418,7 @@ GS_EXPORT void GSUnregisterCurrentThread (void);
414418 */
415419+ (void ) detachNewThreadWithBlock : (GSThreadBlock)block ;
416420
417- /* *
418- * Initialises a NSThread object with block as the
419- * entry point.
421+ /* * Initialises a NSThread object with block as the entry point.
420422 */
421423- (instancetype ) initWithBlock : (GSThreadBlock)block ;
422424#endif // OS_API_VERSION
0 commit comments