Selaa lähdekoodia

ft: 更新# Allocates more memory if necessary

enqueue(item) : bool
enqueue(prod_token, item) : bool
enqueue_bulk(item_first, count) : bool
enqueue_bulk(prod_token, item_first, count) : bool

# Fails if not enough memory to enqueue
try_enqueue(item) : bool
try_enqueue(prod_token, item) : bool
try_enqueue_bulk(item_first, count) : bool
try_enqueue_bulk(prod_token, item_first, count) : bool

# Attempts to dequeue from the queue (never allocates)
try_dequeue(item&) : bool
try_dequeue(cons_token, item&) : bool
try_dequeue_bulk(item_first, max) : size_t
try_dequeue_bulk(cons_token, item_first, max) : size_t

# If you happen to know which producer you want to dequeue from
try_dequeue_from_producer(prod_token, item&) : bool
try_dequeue_bulk_from_producer(prod_token, item_first, max) : size_t

# A not-necessarily-accurate count of the total number of elements
size_approx() : size_t
master
SisMaker 3 vuotta sitten
vanhempi
commit
a75df1086e
1 muutettua tiedostoa jossa 661 lisäystä ja 554 poistoa
  1. +661
    -554
      c_src/enlfq/concurrentqueue.h

+ 661
- 554
c_src/enlfq/concurrentqueue.h
File diff suppressed because it is too large
Näytä tiedosto


Ladataan…
Peruuta
Tallenna