Interview: what is the difference between pthread and windows thread created by _beginthread(ex)?

3.4k Views Asked by At

I was asked about this in an c++ developer position interview, what is the answer to this?

1

There are 1 best solutions below

4
On BEST ANSWER

I would have said:

If I wanted to create a portable cross-platform C++ binary, I'd use pthreads and use the pthread implementation for windows. If I wanted to create a windows-specific C++ binary, I'd use beginthread and avoid the 3rd party dependency on the pthread library.

If they really wanted to know the intricate internal details describing the differences between the two, you should think twice about working there. Unless it was for a reverse engineering job.