MCPcopy Create free account
hub / github.com/cameron314/concurrentqueue / internal_assign

Method internal_assign

benchmarks/tbb/concurrent_queue.cpp:552–567  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

550}
551
552void concurrent_queue_base_v3::internal_assign( const concurrent_queue_base& src, copy_specifics op_type ) {
553 items_per_page = src.items_per_page;
554 my_capacity = src.my_capacity;
555
556 // copy concurrent_queue_rep.
557 my_rep->head_counter = src.my_rep->head_counter;
558 my_rep->tail_counter = src.my_rep->tail_counter;
559 my_rep->n_invalid_entries = src.my_rep->n_invalid_entries;
560
561 // copy micro_queues
562 for( size_t i = 0; i<my_rep->n_queue; ++i )
563 my_rep->array[i].assign( src.my_rep->array[i], *this, op_type );
564
565 __TBB_ASSERT( my_rep->head_counter==src.my_rep->head_counter && my_rep->tail_counter==src.my_rep->tail_counter,
566 "the source concurrent queue should not be concurrently modified." );
567}
568
569void concurrent_queue_base_v3::assign( const concurrent_queue_base& src ) {
570 internal_assign( src, copy );

Callers

nothing calls this directly

Calls 1

assignMethod · 0.45

Tested by

no test coverage detected