-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Add Component Locking section to README #112
Conversation
@lmars I've just merged the Big Docs PR so you'll need to rebase your changes against that |
README.md
Outdated
const req = await space.locks.acquire(id, { attributes }); | ||
``` | ||
|
||
It throws an error if a lock request already exists for the given identifier with a status of `PENDING` or `LOCKED`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth a specific comment here about recursive locking?
644501d
to
34f7c0d
Compare
Signed-off-by: Lewis Marshall <lewis.marshall@ably.com>
34f7c0d
to
22b8d5d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dpiatek , I have added a few comments and suggestions.
```ts | ||
const locks = await space.locks.getAll(); | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we possibly add sample response payloads in each of these methods?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that's necessary - it's always an array of Locks, as signified by the type. I think that would just create more reading for the developer who'd look for differences in those payloads maybe.
22b8d5d
to
d4745c9
Compare
This adds a Component Locking section to the README inline with the description from the PR which introduced the feature (#102).
The documentation is intentionally light on context and is subject to change over the coming weeks as we iterate on the feature.