Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Viewing all articles
Browse latest Browse all 3042

[RESOLVED] I need thread sychronization help

$
0
0
Skill Level: intermediate/novice C++ programmer OS: Windows 10 IDE: Visual Studio Community 2017 Hello. I don't know much about threaded programming, and I am trying to write a win32 program that uses threads. I have written a class called *''*PickEnumerationThreadSynchronizer*''* that is meant to control the synchronization of multiple methods. There are two particular methods should be focused on: 1) *synchronizePrimary()* 2) *synchronizeSecondary()* Within these methods synchronization is lost and my program sometimes permanently hangs. So *THIS *is the location of the problem. The method *synchronizePrimary()* is used to synchronize the source of a vector of vector of strings. The method *synchronizeSecondary( int (*inFunction)(int&), int& parameter)* is used to synchronize the users/clients of that vector of vector of strings. And *inFunction() * is the user/client *Q)* How should I write my code so it doesn't hang??? (let me know if you need more to make sense out of it) Here is my code: Attachment 34983 (http://forums.codeguru.com/attachment.php?attachmentid=34983) Attachment 34985 (http://forums.codeguru.com/attachment.php?attachmentid=34985) Attachment 34987 (http://forums.codeguru.com/attachment.php?attachmentid=34987)

Viewing all articles
Browse latest Browse all 3042

Trending Articles