C: Multithreading

前端 未结 5 2598
孤街浪徒
孤街浪徒 2020-12-09 22:04

Is multithreading supported in C? If yes, then how do I try? Is there any open source library that lets me do it and is the library supported on Mac OS X?

I haven\'

5条回答
  •  醉话见心
    2020-12-09 22:43

    I would guess that the majority of multithreaded programming on Mac OS X is done in Objective-C or C++, not plain C. (I realize that this isn't exactly an answer to the question that you asked, but you might want to know about alternatives.) In Objective-C, you'd use NSThread or, in Snow Leopard and later, Grand Central Dispatch (GCD). In C++, you could use the threads library from boost.org, which has the advantage of being cross-platform.

提交回复
热议问题