Skip to content

Move session's interface method Unlock, Done and Err into interface Service#10

Merged
ahrtr merged 1 commit into
mainfrom
20260515_api
May 15, 2026
Merged

Move session's interface method Unlock, Done and Err into interface Service#10
ahrtr merged 1 commit into
mainfrom
20260515_api

Conversation

@ahrtr

@ahrtr ahrtr commented May 15, 2026

Copy link
Copy Markdown
Owner

A service is actually just a lock returned by NewLock. If users call the Lock or TryLock again without Unlock beforehand, then it should just return the same Grant with the same Fencing token.

The Done channel is only created when the NewLock is called, it doesn't change at all each time when Lock or TryLock is called.

So it doesn't make much sense to have a session object.

…ervice

A service is actually just a lock returned by NewLock. If users call the
Lock or TryLock again without Unlock beforehand, then it should just return
the same Grant with the same Fencing token.

The Done channel is only created when the NewLock is called, it doesn't
change at all each time when Lock or TryLock is called

Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
@ahrtr ahrtr requested a review from Copilot May 15, 2026 20:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 16 out of 17 changed files in this pull request and generated no comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ahrtr ahrtr merged commit 4dccc97 into main May 15, 2026
2 checks passed
@ahrtr ahrtr deleted the 20260515_api branch May 15, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants