Index: src/OFThread.h ================================================================== --- src/OFThread.h +++ src/OFThread.h @@ -129,21 +129,21 @@ * \return An initialized OFThread. */ - initWithObject: (OFObject *)obj; /** - * The run routine of the thread. You need to reimplement this! + * The main routine of the thread. You need to reimplement this! * * It can access the object passed to the threadWithObject or initWithObject * method using the instance variable named object. * * \return The object the join method should return when called for this thread */ -- (id)run; +- (id)main; /** - * This routine is exectued when the thread's run method has finished executing + * This routine is exectued when the thread's main method has finished executing * or terminate has been called. */ - (void)handleTermination; /** Index: src/OFThread.m ================================================================== --- src/OFThread.m +++ src/OFThread.m @@ -27,21 +27,21 @@ static OFList *tlskeys; static of_tlskey_t thread_self; static id -call_run(id obj) +call_main(id obj) { if (!of_tlskey_set(thread_self, obj)) @throw [OFInitializationFailedException newWithClass: [obj class]]; /* * Nasty workaround for thread implementations which can't return a * value on join. */ - ((OFThread*)obj)->retval = [[obj run] retain]; + ((OFThread*)obj)->retval = [[obj main] retain]; [obj handleTermination]; ((OFThread*)obj)->running = OF_THREAD_WAITING_FOR_JOIN; @@ -148,11 +148,11 @@ object = [obj retain]; return self; } -- (id)run +- (id)main { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; return nil; @@ -164,11 +164,11 @@ - start { [self retain]; - if (!of_thread_new(&thread, call_run, self)) { + if (!of_thread_new(&thread, call_main, self)) { [self release]; @throw [OFThreadStartFailedException newWithClass: isa]; } running = OF_THREAD_RUNNING; Index: tests/OFThreadTests.m ================================================================== --- tests/OFThreadTests.m +++ tests/OFThreadTests.m @@ -22,11 +22,11 @@ @interface TestThread: OFThread @end @implementation TestThread -- (id)run +- (id)main { if ([object isEqual: @"foo"]) return @"success"; return nil;