Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Q: read the last FENCE token without incrementing? #10

Closed
glycerine opened this issue Jan 14, 2017 · 1 comment
Closed

Q: read the last FENCE token without incrementing? #10

glycerine opened this issue Jan 14, 2017 · 1 comment

Comments

@glycerine
Copy link
Contributor

To check if I have won an election, I'd like to read the value of the FENCE counter -- without adding to the fence token. Is this possible?

2nd question: is it possible to listen on a FENCE for changes, or does one need to poll?

@tidwall
Copy link
Owner

tidwall commented Jan 14, 2017

To check if I have won an election, I'd like to read the value of the FENCE counter -- without adding to the fence token. Is this possible?

No. Right now it's only possible to increment the token and get the new value back.

I would be trivial to add this feature, perhaps:

FENCE token PEEK

could return the current token value.

2nd question: is it possible to listen on a FENCE for changes, or does one need to poll?

At this time there's no way to listen for changes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants