Hi, can I make another plea for any answers to my question (below). It may
be that the answer is so obviously 'of course it does' that I didn't get a
response.
I did think about posting to the threads.devel list, but it didn't look like
the right place...
Nik
----- Original Message -----
From: "Nicholas Cain"
Hi,
I've created a component that's distributed as a DLL. The user loads the DLL, calls various methods on it and gets some data back asyncronously via callbacks.
Within the component there are several threads (using boost threads of course) any of which might call the callbacks. In all our sample code demonstrating how to create callbacks and call the methods we use boost mutexes to protect the callback functions and this works just fine.
Some of our clients however don't want to dip their toes into boost, and want to use windows methods to protect the callbacks. For instance so far they've tried various methods such as CComAutoCriticalSection and EnterCriticalSection.
They still have a crash which they're attributing to my DLL. I keep pushing them to at least try the boost mutex as in our sample code, but no luck so far.
My question is; should the windows critical section protect the callbacks just as well as the boost mutexes, or does it require a boost mutex protection? (or do you require a code example to know the answer to this?)
Nik