Skip to content
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

Merged
merged 3 commits into from
Sep 4, 2023
Merged

docs: Add Component Locking section to README #112

merged 3 commits into from
Sep 4, 2023

Conversation

lmars
Copy link
Member

@lmars lmars commented Aug 14, 2023

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.

@surminus
Copy link
Collaborator

@lmars I've just merged the Big Docs PR so you'll need to rebase your changes against that

README.md Outdated Show resolved Hide resolved
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`.
Copy link
Member

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?

README.md Outdated Show resolved Hide resolved
Signed-off-by: Lewis Marshall <lewis.marshall@ably.com>
Copy link
Member

@Srushtika Srushtika left a 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.

docs/class-definitions.md Outdated Show resolved Hide resolved
docs/class-definitions.md Outdated Show resolved Hide resolved
docs/class-definitions.md Outdated Show resolved Hide resolved
docs/class-definitions.md Outdated Show resolved Hide resolved
docs/class-definitions.md Outdated Show resolved Hide resolved
docs/class-definitions.md Outdated Show resolved Hide resolved
docs/class-definitions.md Outdated Show resolved Hide resolved
docs/class-definitions.md Outdated Show resolved Hide resolved
docs/class-definitions.md Outdated Show resolved Hide resolved
```ts
const locks = await space.locks.getAll();
```

Copy link
Member

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?

Copy link
Contributor

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.

@dpiatek dpiatek merged commit 053af86 into main Sep 4, 2023
@dpiatek dpiatek deleted the locking-docs branch September 4, 2023 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants