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

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

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

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,

[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