curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Krishmin Rai <k...@catalist.us>
Subject InterProcessSemaphoreV2 and updated SharedCount
Date Mon, 03 Feb 2014 20:22:43 GMT
Hi All,
  This is my first experiment with Curator, and I have some questions about
the SharedSemaphore recipe. In my code, I'm creating an
InterProcessSemaphoreV2 object using SharedCount. Things seem to work as
expected, except in the following case: all leases are currently in use, an
existing process is waiting for the next available lease, and then I
increase the value in the shared counter. Instead of (relatively)
immediately getting the newly-available lease, the waiting process
continues to block until it reaches the end of the timeout period (or
presumably until other processes finish or some other notification occurs).

  After a quick peek in the source code, it seems like updates to
SharedCount set the volatile local variable but do not trigger any
notification. Is this correct?

  Let me know if I'm expecting the wrong behavior or perhaps have some
error on my side (I can provide some sample code or more details on how
I've been testing if that seems likely).

Thanks!
Krishmin

p.s. This is with 2.3.0/2.3.1

Mime
View raw message