Preliminary. ThinkMeta ConcurrentTasks and this documentation are preliminary; everything is subject to change.

API reference / Collections

SListStack class

The Windows interlocked SList, with ListEntry as its entry.

On this page
Use
import ThinkMeta.ConcurrentTasks.Collections.ConcurrentStack;
Namespace
ThinkMeta::ConcurrentTasks::Collections::Detail
Platforms
Windows

Syntax

template <typename T> requires std::is_base_of_v<ListEntry, T> class SListStack

Template parameters

Ttypename
No description yet.

Constructors

SListStack

Constructs an empty stack.

Syntax

SListStack() noexcept;

Methods

Push

Pushes an item on top.

Syntax

void Push(T* item) noexcept;

Parameters

itemT*
Not nullptr; its ListEntry::next is overwritten.

Pop

Removes and returns the top item.

Syntax

T* Pop() noexcept;

Return value

Type: T*

The top item, or nullptr if the stack is empty.

Flush

Removes all items in one operation and returns them as a chain.

Syntax

T* Flush() noexcept;

Return value

Type: T*

The former top item, linked through ListEntry::next; nullptr if empty.

Size

Returns the number of items at the moment of the call.

Syntax

std::uint16_t Size() const noexcept;

Return value

Type: std::uint16_t

The item count, modulo 65536.

Generated from ThinkMeta.ConcurrentTasks.API @ da816bc (2026-11-06).