Re: Committing Resources to Win32 - Mailing list pgsql-hackers-win32

From Marsh Ray
Subject Re: Committing Resources to Win32
Date
Msg-id 3FAB85ED.1070506@mysteray.com
Whole thread Raw
In response to Re: Committing Resources to Win32  (Claudio Natoli <claudio.natoli@memetrics.com>)
Responses Re: Committing Resources to Win32  (Andrew Dunstan <andrew@dunslane.net>)
Re: Committing Resources to Win32  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers-win32
Claudio Natoli wrote:

>> Specifically, I believe and through conversations with several Win32
>>
>>
>programmers I know, that using create process is a bad idea and that we
>should move to a threaded model (at least for Win32).
>
>CreateProcess appears to be the method the core developers have decided
>upon. Unfortunately, and speaking from experience, unless either the
>decision to use MingW as a build environment is reviewed (as opposed to
>VC++, for instance), or MingW "soon" supports thread local storage
>declspecs, a threaded implementation would be just too difficult to
>integrate cleanly with the existing source base.
>
I'm trying to understand this. Is it that the existing code references
static data in so many places that it impractical to move all that into
a structures?

You could put a structure high up on the stack of each thread and pass
down a pointer to it, or use a hash on thread id to reference the data.
Structuring those globals would probably flush out some, er,
"undocumented enhancements".

It looks like the Apache group put a lot of work into modularizing their
execution model for their 2.0.x. It has certainly made their app a
serious choice under Windows.

- Marsh



pgsql-hackers-win32 by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Committing Resources to Win32
Next
From: Andrew Dunstan
Date:
Subject: Re: Committing Resources to Win32