> I meant the CCriticalSection ctor. You could open its source file in the
> MFC's src directory, and put a breakpoint there.
I couldn't find the constructor implementation - only its declaration... can
you see if you can find it? And say which file?
But it would not have worked anyway, for the indeterminate global
initialisation problem.
> Well, those classes can be used with MFC classes just fine. Please read
> their docs to see if they seem to be what you're after.
I will look, but the reason I specifically said no ATL is because I don't
like mixing in template syntax into a project, and what you suggested
requires similar syntax (it's a shame that using the standard library forces
one to use that syntax - I would have hoped that anything that tried to
claim it was part of the core of C++ would stick to normal classes)
> The thread creator object creates the thread in its ctor? If so, you're
> moving with a bad design, because the initialization order of
> global objects
> is not defined.
Yes... the light was just beginning to shine through at what I had done
there, you are right.
>You could solve this by replacing the CCriticalSection
> global object with this funciton:
>
> CCriticalSection & global_cs()
> {
> static CCriticalSection cs;
> return cs;
> }
Hmmm... the structure it was in WAS static... but it still seemed to fail at
Lock().
--
Jason Teagle
[EMAIL PROTECTED]