File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ class ArrayRecordWriterBase::SubmitChunkCallback
250250 // return false if we can't schedule the callback.
251251 // return true and inc num_concurrent_chunk_writers if we can add a new one.
252252 bool TrackConcurrentChunkWriters () {
253- absl::MutexLock l (mu_);
253+ absl::MutexLock l (& mu_);
254254 if (num_concurrent_chunk_writers_ >= max_parallelism_) {
255255 return false ;
256256 }
@@ -495,7 +495,7 @@ void ArrayRecordWriterBase::SubmitChunkCallback::operator()(
495495 footer.set_num_records (num_records);
496496 array_footer_.push_back (std::move (footer));
497497
498- absl::MutexLock l (mu_);
498+ absl::MutexLock l (& mu_);
499499 num_concurrent_chunk_writers_--;
500500}
501501
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ namespace array_record {
3434
3535bool SequencedChunkWriterBase::CommitFutureChunk (
3636 std::future<absl::StatusOr<riegeli::Chunk>>&& future_chunk) {
37- absl::MutexLock l (mu_);
37+ absl::MutexLock l (& mu_);
3838 if (!ok ()) {
3939 return false ;
4040 }
@@ -64,13 +64,13 @@ bool SequencedChunkWriterBase::SubmitFutureChunks(bool block) {
6464 if (block) {
6565 // When blocking, we block both on mutex acquisition and on future
6666 // completion.
67- absl::MutexLock lock (mu_);
67+ absl::MutexLock lock (& mu_);
6868 riegeli::ChunkWriter* writer = get_writer ();
6969 while (!queue_.empty ()) {
7070 TrySubmitFirstFutureChunk (writer);
7171 }
7272 return ok ();
73- } else if (mu_.try_lock ()) {
73+ } else if (mu_.TryLock ()) {
7474 // When non-blocking, we only proceed if we can lock the mutex without
7575 // blocking, and we only process those futures that are ready. We need
7676 // to unlock the mutex manually in this case, and take care to call ok()
@@ -82,7 +82,7 @@ bool SequencedChunkWriterBase::SubmitFutureChunks(bool block) {
8282 TrySubmitFirstFutureChunk (writer);
8383 }
8484 bool result = ok ();
85- mu_.unlock ();
85+ mu_.Unlock ();
8686 return result;
8787 } else {
8888 return true ;
You can’t perform that action at this time.
0 commit comments