Skip to content

Commit eae74a3

Browse files
Fix race between callback and destructor (#1745) (#4222)
Co-authored-by: DimasKovas <34828390+DimasKovas@users.noreply.github.com>
1 parent 43a34f7 commit eae74a3

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

ydb/core/wrappers/s3_storage.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ class TS3ExternalStorage: public IExternalStorageOperator, TS3User {
6767
Y_DEFER {
6868
std::unique_lock guard(RunningQueriesMutex);
6969
--RunningQueriesCount;
70-
bool needNotify = (RunningQueriesCount == 0);
71-
guard.unlock();
72-
if (needNotify) {
70+
if (RunningQueriesCount == 0) {
7371
RunningQueriesNotifier.notify_all();
7472
}
7573
};

0 commit comments

Comments
 (0)