Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -253,11 +253,11 @@ AS_HELP_STRING([--disable-threads], [disable thread support])) AS_IF([test x"$enable_threads" != x"no"], [ case "$host_os" in mingw*) AC_MSG_CHECKING(for threads) - AC_MSG_RESULT(win32) + AC_MSG_RESULT(WinAPI) ;; *) ACX_PTHREAD([ CPPLAGS="$CPPFLAGS $PTHREAD_CFLAGS" LIBS="$LIBS $PTHREAD_LIBS" Index: src/OFThread.h ================================================================== --- src/OFThread.h +++ src/OFThread.h @@ -76,13 +76,18 @@ OF_THREAD_WAITING_FOR_JOIN } running; id retval; } +/** + * \return A new, autoreleased thread + */ ++ thread; + /** * \param obj An object that is passed to the main method as a copy or nil - * \return A new autoreleased thread + * \return A new, autoreleased thread */ + threadWithObject: (id)obj; /** * Sets the Thread Local Storage for the specified key. Index: src/OFThread.m ================================================================== --- src/OFThread.m +++ src/OFThread.m @@ -66,10 +66,15 @@ return; if (!of_tlskey_new(&thread_self)) @throw [OFInitializationFailedException newWithClass: self]; } + ++ thread +{ + return [[[self alloc] init] autorelease]; +} + threadWithObject: (id)obj { return [[[self alloc] initWithObject: obj] autorelease]; } @@ -176,18 +181,10 @@ [thread release]; of_thread_exit(); } -- init -{ - Class c = isa; - [self release]; - @throw [OFNotImplementedException newWithClass: c - selector: _cmd]; -} - - initWithObject: (id)obj { self = [super init]; @try {