I am using TBB concurrent_queue class. It meets my needs except that I need to access the first element before popping it out of the queue (or put it back at front). As I understand from the document, one can't access first element or can't insert at the front like std:deque.
Any help on how to achieve this while maintaining concurrency as far as possible. I only need to access the front element and need to pop it out only if it meets some requirements - for example, to be consumed only after a particular time etc.