Skip site navigation (1) Skip section navigation (2)

Re: Can we simplify win32 threading code

From: "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Can we simplify win32 threading code
Date: 2005-05-27 03:10:26
Message-ID: d7636u$eph$ (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
""Magnus Hagander"" <mha(at)sollentuna(dot)net> writes
> Yeah, that should work. With one shared memory segment and one event for
> each process, of course. The event can be the same one as is used now,
> only it has to be named so it can be accessed externally.

Yes, the shared memory segment size could be controlled by MaxBackends.

> It would do away with the thread, certainly. But it's not quite as
> simple as you outline above - you'll need to replace the critical
> section locking (easy, lightweight) with a mutex or something like that
> (more complex, more heavy weight). But probably named pipes is more
> heavy, yes.

Yes, use mutex.

> You'll also need some way of delivering the feedback, I think - kill(0)
> is supposed to tell you if there is a live process in th eother end, so
> you can't just throw the signal out and hope for the best.

To simulate kill(0) we can test the process handle, just like we handle

In response to

pgsql-hackers by date

Next:From: Qingqing ZhouDate: 2005-05-27 03:22:10
Subject: Re: Can we simplify win32 threading code
Previous:From: Tom LaneDate: 2005-05-27 03:09:28
Subject: Re: A 2 phase commit weirdness

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group