Skip to content

Commit

Permalink
utils/mutex: remove unnamed constructor
Browse files Browse the repository at this point in the history
Certain structures like semaphore and mutex can be "named" which is
useful to identify a particular structure in log messages, exceptions
or just about anything you can imagine.

When we added support for named mutexes, we did not give names to all
existing mutexes, perhaps because there are a lot of them: the
unnamed version of the constructor was left and remove it was
left as a TODO.

This change crosses that TODO off the list and removes the unnamed
constructor (the prior change in this series named all existing
mutexes that weren't already named).

Issue redpanda-data#5489.
  • Loading branch information
travisdowns committed Mar 8, 2024
1 parent a130c65 commit 5e688fd
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/v/utils/mutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ class mutex {
using time_point = typename ss::semaphore::time_point;
using units = typename ssx::semaphore_units;

// TODO: stop using this constructor and force usage of explicit names.
mutex()
: _sem(1, "mutex") {}

explicit mutex(ss::sstring name)
: _sem(1, std::move(name)) {}

Expand Down

0 comments on commit 5e688fd

Please sign in to comment.