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

Re: Win32 open items

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Magnus Hagander" <mha(at)sollentuna(dot)net>
Cc: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>,pgsql-patches(at)postgresql(dot)org
Subject: Re: Win32 open items
Date: 2004-10-30 19:58:52
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
"Magnus Hagander" <mha(at)sollentuna(dot)net> writes:
>> We don't need the cancelConnLock if this is done properly (at least,
>> assuming that storing a pointer is atomic, which seems reasonable).

> Anyway, consider this scenario. Thread A is the mainloop thread, Thread
> B is the thread that handles Ctrl-C. What if Thread B starts its run and
> starts reading off the pointer. Before it's done, it's pre-empted, and
> Thread A starts executing. Thread A does a free() on the memory pointed
> to by the pointer. When control goes back to Thread B, it will definitly
> die.

Good point.  Never mind that claim then ...

			regards, tom lane

In response to

pgsql-patches by date

Next:From: Magnus HaganderDate: 2004-10-30 20:51:01
Subject: Re: Win32 open items
Previous:From: Magnus HaganderDate: 2004-10-30 19:33:22
Subject: Re: Win32 open items

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