- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- « Previous
-
- 1
- 2
- Next »
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To be honest I donot know what was the problem. However now I solved it.
I am struggling to understand how the mutex works. I am working on the event-programs you sent me before. I don't understand when the mutex becomes signalled and when the thread owns it or not. The WaitSing...function is not locking always and gives me 0. I understand that this has to do with the fact that the thread owns the mutex. But initially when I am creating the mutex in the main program: CreateMutex(NULL,FALSE,"m1"), and I start the sub-prog: LRes(1) = SYSTEMQQ("start .DebugMutexTest2.exe") the sub-program opens the mutex: OpenMutex(MUTEX_ALL_ACCESS,FALSE,"m1") properly. The main now, even though it has after the systemqq a WaitForSingleObject(hMutex, INFINITE) it doesn't lock there until the sub-program to finish.
Probably there is something I am doing wrong.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I noticed you wrote CreateMutex(NULL,FALSE,"m1"). I'm not sure if that's the actual code, but that ought to be "m1"C or "m1"//char(0). You can get all sorts of inconsistent behaviour if you forget to null-terminate the strings.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you ever experience the fact having for example 10 threads, and up to a certain moment everything to work well until a moment where even though the main program sets the events correctly (returns 1), the specific sub-program hasn't manage to restart and reset each event. At the end of the day the main program goes to waitformultiple objects statement and passes it without all the sub-programs to have re-started and reseted their events. I understand that this is a problem of synchronization due to the multiple threads in a single processor. Is there a way the main program to know that definetely all the events have been reseted before to go to waitmultip?
Any ideas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- « Previous
-
- 1
- 2
- Next »