| From: | "Magnus Hagander" <mha(at)sollentuna(dot)net> |
|---|---|
| To: | "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>, <pgsql-patches(at)postgresql(dot)org> |
| Subject: | Re: Win32 semaphore patch |
| Date: | 2006-04-21 07:26:43 |
| Message-ID: | 6BCB9D8A16AC4241919521715F4D8BCEA352D9@algol.sollentuna.se |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-patches |
> > For #2, yes, the semaphores will go away when the last
> process holding
> > a HANDLE to it goes away. For #1, the code seems to handle
> that right?
> >
>
> I intentionally use *unnamed* semaphores to avoid these
> problems -- even if the semaphores didn't go away (as Magus
> pointed out, if all processes can exit gracefully, this won't
> happen), we won't worry about them -- Creating semahpores
> will still succeed because there is no existent same named
> semaphores will bother it.
Just a point - they will get automatically cleaned up even if the
process doesn't exit *gracefully*, as long as it exits. Only if it's
hung and won't actually exit will the handles not get cleaned up.
This goes for both named and unnamed ones.
//Magnus
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Qingqing Zhou | 2006-04-21 07:35:27 | Re: Win32 semaphore patch |
| Previous Message | Tom Lane | 2006-04-21 06:04:40 | Re: Win32 semaphore patch |