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

perf(ILockManager): Allow registering a lock provider lazy #44953

Merged
merged 1 commit into from
May 13, 2024

Conversation

juliusknorr
Copy link
Member

@juliusknorr juliusknorr commented Apr 22, 2024

In order to register the lock provider without directly initializing required dependencies through DI we need to register it lazy.

As the LockManager is only handling registration/delegation of method calls it doesn't come with its own dependencies and therefore is enough to handle this. We could also move this to a dedicated registerLockProvider method but as of now there is just one use case with the files_lock app and this seems too little to justify for a explicit registration method.

Contributes to #44951

Required for nextcloud/files_lock#297

Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliusknorr juliusknorr self-assigned this May 10, 2024
@juliusknorr juliusknorr merged commit c4e32d3 into master May 13, 2024
157 checks passed
@juliusknorr juliusknorr deleted the perf/44951/lock-provider branch May 13, 2024 12:21
@@ -42,9 +42,17 @@ interface ILockManager extends ILockProvider {
/**
* @throws PreConditionNotMetException if there is already a lock provider registered
* @since 24.0.0
* @deprecated 30.0.0 Use registerLazyLockProvider
Copy link
Member

Choose a reason for hiding this comment

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

juliusknorr added a commit to nextcloud/documentation that referenced this pull request Jul 19, 2024
@blizzz blizzz mentioned this pull request Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants