Should I use state variables from the C ++ standard or from the Windows API?

With the introduction of variable conditions in Win32 C ++ program would be better to use the functions, classes and types of Win32 data (eg, CreateThread, SleepConditionVariableCS, WaitForSingleObjectEx, ReleaseMutex, CONDITION_VARIABLE) or those of the standard C ++ library 11 (eg, thread, wait, join, unlock, CONDITION_VARIABLE)?

Since the answer to this question is probably not binary, what considerations should be taken into account when making such a decision?

+4
source share
2 answers

++ ++. , RAII . .

, , API Windows. , ( ), .

, -.

+6

, . , MinGW Windows , API POSIX Win32. , TDM-GCC, , 4.7.1 Win32, 4.8.1 POSIX. , Microsoft-, , .

POSIX, ++ (, thread, mutex, condition_variable). Win32, Win32.

TDM-GCC 4.7.1 ++, ( , ). MinGW "posix" "threads" . .

+1

Source: https://habr.com/ru/post/1523921/


All Articles