File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,7 @@ class ExecutorGroup
124
124
: group_(group)
125
125
, agent_(std::move(agent))
126
126
{
127
+ MRDOX_ASSERT (agent_.get () != nullptr );
127
128
}
128
129
129
130
~scoped_agent ()
@@ -135,21 +136,26 @@ class ExecutorGroup
135
136
136
137
Agent& operator *() const noexcept
137
138
{
139
+ MRDOX_ASSERT (agent_.get () != nullptr );
138
140
return *agent_;
139
141
}
140
142
};
141
143
142
144
void
143
145
run (std::unique_lock<std::mutex> lock)
144
146
{
147
+ MRDOX_ASSERT (lock.owns_lock ());
145
148
std::unique_ptr<Agent> agent (std::move (agents_.back ()));
149
+ MRDOX_ASSERT (agent.get () != nullptr );
146
150
agents_.pop_back ();
147
151
++busy_;
148
152
149
153
threadPool_.async (
150
154
[this , agent = std::move (agent)]() mutable
151
155
{
156
+ MRDOX_ASSERT (agent.get () != nullptr );
152
157
scoped_agent scope (*this , std::move (agent));
158
+ MRDOX_ASSERT (agent.get () == nullptr );
153
159
std::unique_lock<std::mutex> lock (impl_->mutex_ );
154
160
for (;;)
155
161
{
You can’t perform that action at this time.
0 commit comments