Thread: Re: win32 setitimer implementation

Re: win32 setitimer implementation

From
"Magnus Hagander"
Date:
> > Here is a patch that implements setitimer() on win32. With
> this patch
> > applied, deadlock detection and statement_timeout now works.
> >
> > The file timer.c goes into src/backend/port/win32/.
>
> Minor comments:
>
> * "timer.c" has shmem.c in header
Oops. Cut-and-paste shows a bit to clearly there.

> * I'd suggest Asserts on the remaining 2 limitations ("zero"
> it_interval and NULL ovalue), on the off chance that some
> future change to the source expects them (ie. so we'll find
> out about it under win32 pretty quickly);
Ok, will do and send updated patch.

> possibly provide
> defines of ITIMER_VIRT and ITIMER_PROF, for completeness.
I was thinking specifically not providing it. This way we will find out
*really* fast if somebody adds usage of them - since the compile will
break. Then we add them once they are required.
Otherwise, we always have the risk that if it's added in a
not-often-called-place, it will take a while before anybody picks it up.
Easier to fix right away.


//Magnus