rigtorp / MPMCQueue

A bounded multi-producer multi-consumer concurrent queue written in C++11
MIT License
1.18k stars 160 forks source link

Std::map to queue #42

Closed vswdigitall closed 11 months ago

vswdigitall commented 11 months ago

Hi, can i emplace/push std::map object?

brmarkus commented 11 months ago

Depends on the data-structure you use for std::map's template parameter - could your data be moved and emplaced?

vswdigitall commented 11 months ago

It is std::map< size_t, int32_t >.

brmarkus commented 11 months ago

Should be no problem for such basic data types.

vswdigitall commented 11 months ago

std::pair int int works. Thank you.

brmarkus commented 11 months ago

std::pair instead of std::map - have you found problems with std::map so that you redesigned your data structure?

vswdigitall commented 11 months ago

Yes, redesigned. My mistake.

brmarkus commented 11 months ago

No worries. Feel free to close this Github issue if no more questions, see "https://docs.github.com/en/issues/tracking-your-work-with-issues/closing-an-issue".