Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie to C: Help with Threads 1

Status
Not open for further replies.

MarionUK

Programmer
Dec 5, 2003
3
GB
HI
I need help in implementing some thread code, will CreateMutex() and then WaitForSingleObject be sufficient. Else please give me some suggestions.
Thanks
 
if you're working only with treads, you should use critical secrions (InitializeCriticalSection ), and use EnterCriticalSection/LeaveCriticalSection

Ion Filipski
1c.bmp
 
My executable will be called from another program (not mine) a number of times, possibly almost simultaneously and I would like to ensure that all instances of my program are run successfully.
Could you help?
Thanks
 
If you would like to synchronize processes, you thave taken the correct point with mutexes. So, go ahead, read technical documentation. There is no problems to use them. If you have one, put it right here.

Ion Filipski
1c.bmp
 
So adding the mutex will ensure that ALL instances of this executable are run and run sequentially?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top