Re: [HACKERS] Latches API on windows

2017-10-09 Thread Andres Freund
On October 9, 2017 6:56:10 AM PDT, Tom Lane wrote: >Craig Ringer writes: >> On 9 October 2017 at 21:26, Abbas Butt >wrote: >>> In my case this is not true, I am calling InitSharedLatch in >_PG_init >>> which gets called at CREATE EXTENSION time. >>> My question : Is there a way to get the latc

Re: [HACKERS] Latches API on windows

2017-10-09 Thread Abbas Butt
Thanks for the suggestion. On Mon, Oct 9, 2017 at 6:56 PM, Tom Lane wrote: > Craig Ringer writes: > > On 9 October 2017 at 21:26, Abbas Butt > wrote: > >> In my case this is not true, I am calling InitSharedLatch in _PG_init > >> which gets called at CREATE EXTENSION time. > >> My question :

Re: [HACKERS] Latches API on windows

2017-10-09 Thread Tom Lane
Craig Ringer writes: > On 9 October 2017 at 21:26, Abbas Butt wrote: >> In my case this is not true, I am calling InitSharedLatch in _PG_init >> which gets called at CREATE EXTENSION time. >> My question : Is there a way to get the latches API work on windows >> the way it is working on Linux? >

Re: [HACKERS] Latches API on windows

2017-10-09 Thread Craig Ringer
On 9 October 2017 at 21:26, Abbas Butt wrote: > Hi, > I am working on a contrib module that uses RegisterDynamicBackgroundWorker > API > to create a couple of worker processes. For synchronization between the > background worker processes I am using InitSharedLatch, SetLatch, WaitLatch > APIs. > O

[HACKERS] Latches API on windows

2017-10-09 Thread Abbas Butt
Hi, I am working on a contrib module that uses RegisterDynamicBackgroundWorker API to create a couple of worker processes. For synchronization between the background worker processes I am using InitSharedLatch, SetLatch, WaitLatch APIs. One of the processes is supposed to wait for the latch, the ot