Enqueues a single item (by copying it). Does not allocate memory. Fails if not enough room to enqueue (or implicit production is disabled because Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE is 0). Thread-safe.
| 609 | // is 0). |
| 610 | // Thread-safe. |
| 611 | inline bool try_enqueue(T const& item) |
| 612 | { |
| 613 | if (inner.try_enqueue(item)) { |
| 614 | sema->signal(); |
| 615 | return true; |
| 616 | } |
| 617 | return false; |
| 618 | } |
| 619 | |
| 620 | // Enqueues a single item (by moving it, if possible). |
| 621 | // Does not allocate memory (except for one-time implicit producer). |