Quantcast
Channel: Multithreading and Critical Sections Use - C++ - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Multithreading and Critical Sections Use - C++

$
0
0

I'm a little confused as to the proper use of critical sections in multithreaded applications. In my application there are several objects (some circular buffers and a serial port object) that are shared among threads. Should access of these objects always be placed within critical sections, or only at certain times? I suspect only at certain times because when I attempted to wrap each use with an EnterCriticalSection / LeaveCriticalSection I ran into what seemed to be a deadlock condition. Any insight you may have would be appreciated. Thanks.


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images