---
title: runInNewThread
framework: foundation
role: symbol
role_heading: Instance Method
path: foundation/nsconnection/runinnewthread
---

# runInNewThread

Creates and starts a new NSThread object and then runs the receiving connection in the new thread.

## Declaration

```occ
- (void) runInNewThread;
```

## Discussion

Discussion If the newly created thread is the first to be detached from the current thread, this method posts an NSWillBecomeMultiThreaded with nil to the default notification center.

## See Also

### Running the Connection in a New Thread

- [enableMultipleThreads](foundation/nsconnection/enablemultiplethreads.md)
- [multipleThreadsEnabled](foundation/nsconnection/multiplethreadsenabled.md)
- [addRunLoop:](foundation/nsconnection/addrunloop:.md)
- [removeRunLoop:](foundation/nsconnection/removerunloop:.md)
