tbb::concurrent_queue push and pop with move semantics

tbb::concurrent_queue push and pop with move semantics

Hello Intel,

I'm writing a c++11-native set of libraries and am using std::unique_ptr<> - style pointers in all relevant circumstances. I see that the tbb::concurrent_queue push signature requires a copy. 

Would you please consider adding a std::move-enabled move to your push and pop signatures, as in:

void push( const T&& source );

bool try_pop( T&& destination );

Perhaps under the covers this is a bad idea, but I don't see why it would be. 

Thank you,

-Jay

3 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

Thank you for suggestion. Will see what we can do. It looks reasonable.

Thank you Wooyoung. Its probably obvious that many tbb containers etc could benefit, not just concurrent_queue as per my first inquiry. 

Regards -Jay

Connectez-vous pour laisser un commentaire.