Andrew Chernow wrote:
> Tom Lane wrote:
> >Silently not locking is surely
> > not very safe.
> >
>
> Here is the dump code version of the patch. If anyone wants the
> return value idea, let me know.
Here's a version of this patch that doesn't use malloc - instead, I had
to change the callers to it a bit.
This makes a difference only on Vista+ really, because prior to Vista
the function InitializeCriticalSection() *can* fail - it will throw an
exception and not return any error code. Which really isn't that
different from just crashing like this latest patch from Andrew would
have us do (on out of memory).
I'm leaning towards going with the simpler one, which is the patch from
Andrew that crashes on out of memory.
Comments/preferences?
//Magnus