gvansickle / ucg

UniversalCodeGrep (ucg) is an extremely fast grep-like tool specialized for searching large bodies of source code.

Home Page:https://gvansickle.github.io/ucg/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Queue of std::shared_ptr to queue of std::unique_ptr?

gvansickle opened this issue · comments

Globber/DirTree use a "sync_queue<std::shared_ptr>& m_out_queue;" to move FileIDs from the globbing threads to the scanning threads. It's not clear to me atm why these couldn't be "sync_queue<std::unique_ptr...", though there might be a reason I'm not thinking of. Changing to unique_ptr, if possible, would eliminate ref counting overhead.