why multithreading in 'project settings/ code generation'
hi, i use a thread which checks if data is incoming in my socket connection.
but if i dont change anything in ''microsoft vc++ development studio/project settings/code generation'', what means that there is nothing about multithreading, my program still works. so what do i change when i choose as runtime library multithreaded? and what is the difference between ''multithreaded'', ''debug multighreded'' and ''(debug) multithreaded dll''?
The problem of Object Oriented Programming:Everybody tells you how to use his classes, but nobody how not to do it !
choosing multithreaded crt ensures that c/c++ functions are thread-safe. for instance, if two threads try to call new at the same time, singlethreaded runtime will likely corrupt the heap and/or crash, while multithreaded runtime will make one thread wait while the other uses the heap.
using singlethreaded runtime doesn''t automatically mean that your program won''t work, but chances are it indeed won''t. multithreaded runtime ensures that there are no problems when more than one thread uses it simultaneously.
multithread dll runtime is the same as multithreaded one, but your app will be linked to msvcrt.dll which contains the crt code instead of keeping all crt code that you use in your exe (which is what singlethreaded option does).
using singlethreaded runtime doesn''t automatically mean that your program won''t work, but chances are it indeed won''t. multithreaded runtime ensures that there are no problems when more than one thread uses it simultaneously.
multithread dll runtime is the same as multithreaded one, but your app will be linked to msvcrt.dll which contains the crt code instead of keeping all crt code that you use in your exe (which is what singlethreaded option does).
thanks for the answer. does this mean that i also can leave out mutexes when i select multithreaded? or does that just protect some special expressions like new?
The problem of Object Oriented Programming:Everybody tells you how to use his classes, but nobody how not to do it !
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement