Documentation

ThreadSafeCollections-FP

Thread-safe generic lists, deques, dictionaries, and hash sets for Free Pascal.

Getting StartedQuick Start

Compile a first thread-safe list in five minutes.

CollectionsList

Indexed storage with sorting, searching, and range operations.

CollectionsDeque

Queue and stack behaviour at both ends.

CollectionsDictionary

Locking key/value lookup with snapshot iteration.

CollectionsHash Set

Unique values with set algebra and specialized types.

PatternsLock Tokens

RAII-style locking through interface counting.

ThreadSafeCollections-FP concurrent collections for Free Pascal banner

ThreadSafeCollections-FP provides familiar collection APIs with per-instance synchronization, bulk operations, and documented iteration behavior for Free Pascal and Lazarus. It is a learning-focused project with a tested core, runnable examples, and no required packages beyond the Free Pascal standard distribution.

What you can do#

Each collection instance owns one TCriticalSection and exposes the same familiar operations you expect from a non-threaded collection, synchronized per method call. Choose a collection below, then read the guide that matches your task.

  • List — indexed storage with add, insert, delete, range, sort, search,

reverse, and capacity operations.

  • Deque — a circular-buffer double-ended queue with Push/Pop/Peek*

and Try* operations at both ends.

  • Dictionary — chained hash buckets for key/value storage with custom hash

and equality functions and snapshot-based iteration.

  • Hash set — unique values with intersection, union, difference, overlap,

and set-equality operations, plus specialized integer, string, Boolean, and real subclasses.

Where to start#

Learning Path.

  • Adding the library to an application? Start with

Installation.

  • Looking up a declaration? Open the generated

Cheat Sheet and the API Overview.

The online documentation is versioned. The top-level site opens the current release (/0.8.8/); the version selector in the header moves between released documentation paths and stays on the matching page when it exists.