c++ - Using std::thread or CreateThread()? -


this question has answer here:

i revising codes when doing project developed when started coding in c/c++.

it's threading. in tutorials read (which 2006) said that, when developing windows, 1 use createthread() create threads. using function better using std::thread?

is faster also?

in applications load crt (as c/c++ are) can't use createthread, per spec:

a thread in executable calls c run-time library (crt) should use _beginthreadex , _endthreadex functions thread management rather createthread , exitthread; requires use of multithreaded version of crt. if thread created using createthread calls crt, crt may terminate process in low-memory conditions.

std::thread on other hand right thing.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

android - Keyboard hides my half of edit-text and button below it even in scroll view -