-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Labels
experimentalsome experimental results or changessome experimental results or changes
Description
Thanks to Cppers on reddit here.
Currently the Looper use std::map<int, std::unique_ptr<Connection>> to keep track of which connection's lifecycle is under its monitoring.
/**
* This Looper acts as the executor on a single thread
* adopt the philosophy of 'one looper per thread'
* */
class Looper {
public:
...
private:
...
std::map<int, std::unique_ptr<Connection>> connections_;
...
};
However, since we don't required the ordered property provided by std::map, a better performance could be achieved by using std::unordered_map. Typically given the fact that currently any access to this connections_ variable requires mutex for synchronization.
I plan to implement this feature shortly.
Yukun
Feb 07
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
experimentalsome experimental results or changessome experimental results or changes