Skip to content

Commit 17a2399

Browse files
committed
Merge #107: example: Remove manual client adding
3499810 example: Remove manual client adding (TheCharlatan) Pull request description: Opening this more as a question, than a change request, because I am not sure what is going on here, since removing it does not seem to change anything in the program's functionality. This is probably needed, but it is not clear from the example, or the documentation for what. If it is indeed needed, could the documentation be improved a bit, a comment added to the example or could it alternatively be moved into the `EventLoop` constructor instead? From my understanding `addClient` is eventually called internally when a new connection or proxy is created. ACKs for top commit: ryanofsky: Code review ACK 3499810. This code change makes sense, and it definitely doesn't make sense to have an `addClient` call without a corresponding `removeClient` call here. Tree-SHA512: 0072d429f6029ebd02f34d57996ae3fed94061d0fea3ebf057955632436f179c2cb88b4f4d54bac88b65c1d99060acb902b2ea514f7a88a14f5f7750c0672ea8
2 parents c1b4ab4 + 3499810 commit 17a2399

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

example/example.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ int main(int argc, char** argv)
3939
std::promise<mp::EventLoop*> promise;
4040
std::thread loop_thread([&] {
4141
mp::EventLoop loop("mpexample", LogPrint);
42-
{
43-
std::unique_lock<std::mutex> lock(loop.m_mutex);
44-
loop.addClient(lock);
45-
}
4642
promise.set_value(&loop);
4743
loop.loop();
4844
});

0 commit comments

Comments
 (0)