Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Eliminate overhead of std::function in EventPoller #12

@andrewkcorcoran

Description

@andrewkcorcoran

https://github.com/Abc-Arbitrage/Disruptor-cpp/blob/master/Disruptor/EventPoller.h#L39 could be trivially refactored to take a forwarding reference as the eventHandler instead of a std::function. This would eliminate the potential for memory allocation when the std::function is constructed and the virtual call when the eventHandler is invoked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions