What is the difference between NSThread and pthread? Does NSThread use pthread as its internal implementation and do we really need the extra overhead of NSThread when pthreads suffice especially on the iPhone.
I don't know for sure if NSThread
use pthreads library internally. It probably does, but since we don't have source code for NSThread
we really don't know.
The difference is that pthread
is a C library and NSThread
is an Objective-C library. But they both accomplish the same functionality.
The need for an Objective-C library is if you need to use it in combination with other portions of Objective-C API. I.E., you won't be able to store a pthread in a NSArray
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With