MCPcopy Create free account
hub / github.com/CesiumGS/cesium-native / push

Method push

CesiumAsync/src/QueuedScheduler.cpp:32–47  ·  view source on GitHub ↗

Push a task to the end of the queue

Source from the content-addressed store, hash-verified

30
31 // Push a task to the end of the queue
32 void push(async::task_run_handle t) {
33 // Resize queue if it is full
34 if (head == ((tail + 1) & (items.size() - 1))) {
35 async::detail::aligned_array<void*, LIBASYNC_CACHELINE_SIZE> new_items(
36 items.size() * 2);
37 for (std::size_t i = 0; i != items.size(); i++)
38 new_items[i] = items[(i + head) & (items.size() - 1)];
39 head = 0;
40 tail = items.size() - 1;
41 items = std::move(new_items);
42 }
43
44 // Push the item
45 items[tail] = t.to_void_ptr();
46 tail = (tail + 1) & (items.size() - 1);
47 }
48
49 // Pop a task from the front of the queue
50 async::task_run_handle pop() {

Callers 11

index.jsFile · 0.80
generateChartFunction · 0.80
pushContextMethod · 0.80
resolvePropertyFunction · 0.80
resolveEnumFunction · 0.80
index.jsFile · 0.80
processSchemasFunction · 0.80
generateFunction · 0.80
scheduleMethod · 0.80
createEventsStorageFunction · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected