<p>What is the best way to multi-thread in the C language? I want something that is very efficient and not a CPU hog. Thanks.</p>

[{'answer_id': 43089, 'author': 'Kyle Cronin', 'author_id': 658, 'author_profile': 'https://Stackoverflow.com/users/658', 'pm_score': 2, 'selected': False, 'text': '<p>If you\'re on a UNIX-based platform (Linux or Mac OS X) your best option is <a href="http://en.wikipedia.org/wiki/POSIX_Threads" rel="nofollow noreferrer">POSIX threads</a>. They\'re the standard cross-platform way to multithread in a POSIX environment. They can also be used in Windows, but there are probably better (more native) solutions for that platform.</p>\n'}, {'answer_id': 43102, 'author': '1800 INFORMATION', 'author_id': 3146, 'author_profile': 'https://Stackoverflow.com/users/3146', 'pm_score': 0, 'selected': False, 'text': '<p>Your question is a bit general to answer effectively. You might look into such things as:</p>\n\n<p>CreateThread in the windows SDK</p>\n\n<p>boost::thread</p>\n'}, {'answer_id': 43179, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 3, 'selected': True, 'text': '<p>The correct (standard) way to do this on C and Windows is with <a href="http://msdn.microsoft.com/en-us/library/kdzttdcb.aspx" rel="nofollow noreferrer">__beginthreadex</a>.</p>\n\n<p>This is usually preferred to calling <a href="http://msdn.microsoft.com/en-us/library/kdzttdcb.aspx" rel="nofollow noreferrer">CreateThread</a> directly as CreateThread doesn\'t init C runtime support for the thread. So if you create a thread using CreateThread, and call a CRT function, bad stuff can/will happen.</p>\n\n<p>Note that __beginthreadex calls CreateThread internally, but performs some other work behind the scenes.</p>\n'}]
['https://Stackoverflow.com/questions/43086', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/130278/']