Follow-up from "WIP: Resolve "Congestion handling - add receive thread and packet queue"
The following discussions from !103 (merged) should be addressed:
-
@marcin started a discussion: (+4 comments) I have some worries about this initialization part being done in the thread and not really guarded from concurrent access to IfaceMgr. Although unlikely, there is a possibility that ifaces_ is modified while the thread is starting up. To mitigate this problem, the method which starts the thread should maybe wait for it to signal that it has been initialized and the for() loop has started. I mean, we should maybe revise the whole IfaceMgr to see whether something in it can be modified that is concurrently used in the thread and not allow such modification if the thread is running? Specifically, sockets and interfaces should not be touched while the thread is running because even the for() loop accesses them.
-
@marcin started a discussion: (+3 comments) Parameters of the constructor aren't properly documented.
-
@marcin started a discussion: (+4 comments) That deserves some comment.
-
@marcin started a discussion: (+5 comments) I was scratching my head how is the new IfaceMgr code compatible with perfdhcp, which is also using receive4() and receive6() functions, but it doesn't (at least not explicitly) start receiver thread? On that matter, I also wonder if it shouldn't be optional to use the thread? perfdhcp probably doesn't want to drop any packets in the ring buffer?