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

Release notes

On this page

The documentation always describes the current state of the ThinkMeta.ConcurrentTasks.API repository. This page lists what changed from version to version.

Important

ConcurrentTasks is a preview. The API may still change between versions, and programs built against one core must be rebuilt for the next. Always ship your executable together with the core binary it was built with.

Samples 0.7.0 — 2026-11-25

A release of ThinkMeta.ConcurrentTasks.Samples only, with a sixth sample and the first that is not an encoder; the core, the library and the five encoders stay as they are.

  • ctJolt 0.1.0 (preliminary) is new: the physics engine Jolt Physics 5.7.0 with its physics step running as fine-grained tasks. It ends every step with exactly the same state as unmodified Jolt, bit for bit, at any thread count. Jolt already runs in parallel on its own job system; ctJolt replaces it for the step and runs the islands of a step as task chains that do not wait for each other at Jolt's stage barriers, and threads that run out of work join the large islands still running. All changes are inside Jolt's own files, under compile-time switches.
    • In Jolt's PerformanceTest on the Core i9-11900K at 16 threads, the scenes with solver work run 24–37 % faster (Ragdoll 507 → 636 steps per second, with continuous collision detection 13 %); the two scenes dominated by collisions against a mesh are about even (−11 % to +1 %).
    • Windows x64 only for now (needs AVX2, FMA and BMI1/2), with verify\ (reference hashes), a benchmark script and the task graph.

Samples 0.6.0 — 2026-11-20

A release of ThinkMeta.ConcurrentTasks.Samples only, with a fifth encoder; the core and the library stay as they are.

  • ctJxl 0.1.0 (preliminary) is new: a JPEG XL encoder that writes exactly the same files as cjxl from libjxl 0.13.0, byte for byte, and spreads the encoding of a single image or animation over all cores. Unlike the other four, its reference already runs in parallel: libjxl splits its kernels into regions on its own thread pool. ctJxl is libjxl itself, with eleven of its encoder files replaced by marked copies; it runs those regions as tasks, so they can nest, encodes the DC groups of a large image, the subtrees of a modular tree and the frames of an animation at the same time, and reads the input while it encodes.
    • On the Core i9-11900K photos encode 1.6 times as fast at cjxl's default (-q 90), 1.2 times lossless, and a GIF animation up to 7 times; the 25 images of the JPEG XL conformance set 1.7 / 2.1 times (-q 90 / -d 0).
    • Windows (needs AVX2) and Linux x64, with verify\ (reference tables per platform), a benchmark script for Windows and the task graph.
  • New benchmark numbers for all five encoders, from a cold run on three machines on 2026-11-19 (Core i9-11900K, Xeon E3-1275 v6, Core Ultra 7 155H). The other four programs are unchanged; on the i9 ctLame is 13.9 times as fast as LAME, ctOpus 4.5 times as fast as opusenc, ctJpeg 5.3 times as fast as jpegli and ctDeflate 4.3 times as fast as gzip at level 9.
  • Shared: SchedulerHandle::Create and RunningScheduler take an optional task queue capacity (0 keeps the core's default).

Samples 0.5.1 — 2026-11-17

A release of ctLame in ThinkMeta.ConcurrentTasks.Samples only; the core, the library and the other three encoders stay as they are.

  • ctLame 0.3.0 is written the way the chapter Task-based programming describes, and a new page of that chapter, A real program: ctLame, derives it from LAME's loop step by step.
    • Every stage of a frame has tasks of its own, each a plain loop over the frames of its stage: PrepareTask and SearchTask, one per compute thread each, in place of one worker task that did both kinds of work.
    • Reading and writing do one request at a time, and the writer writes the file front to back: ID3v2 tag, MP3 stream, ID3v1 tag, and then the LAME tag in its place.
    • What two tasks share is an object that holds the data and owns the waiting (BlockPipe, SharedSampleStream, FrameRing, Mp3File). The header of each says who waits, who wakes and how the end gets through.
    • A new unit test runs the whole graph on one thread, with its tasks started in many orders and with other priorities, and compares each file with the one of the sequential graph.
  • The output is unchanged, byte for byte, and the new form costs nothing that can be measured: on a Core i9-11900K ctLame 0.3.0 is as fast as 0.2.1, within the 0.3 % by which two builds of the same code differ. The published benchmark numbers stay.
  • --stats lists prepare and search as nodes of their own, and the idle time of a node is the time it waits.
  • The reference lame.exe is rebuilt with the same compiler as ctLame.exe; its source and its output are unchanged.

0.5.0 — 2026-11-16

A feature release: a scheduler without threads, whose tasks run on the thread that calls its Run. The core gains one entry point; the existing ones are unchanged (SchedulerVersion stays 2), so programs built against 0.4.0 run with the new core. Programs that use the new entry point need the new core.

Scheduler core

  • A new kind of scheduler runs its tasks inside Run, on the caller: CreateLocalScheduler returns an ILocalScheduler. Run runs the tasks on the calling thread and returns once every task has ended. While all of them wait, the thread sleeps. Only that thread adds tasks; they may be resumed from any thread, so they can wait for the threads of a default scheduler, for timers and for asynchronous I/O. Run is for a plain thread such as main, not for a task or a converted thread. See The local scheduler. SchedulerInfo and SchedulerVersion are unchanged. On Windows and Linux.
  • On Linux the library is still libThinkMeta.ConcurrentTasks.Core.so.2; the new entry point has the symbol version CT_CORE_2.1, the existing ones keep CT_CORE_2.

C++ module library

Samples

  • A new chapter, Task-based programming, explains the way of programming this library is made for, with one program that goes from procedural code to tasks. The program is Samples/Docs/TaskBasedProgramming (Windows only, it uses BCrypt); the samples of the local scheduler are in Samples/Docs/ConceptLocalScheduler.
  • The four encoders in ThinkMeta.ConcurrentTasks.Samples ship with the 0.5.0 core. The programs themselves are unchanged (ctLame 0.2.1, ctOpus 0.1.4, ctDeflate 0.1.4, ctJpeg 0.1.3), and so is their output, byte for byte.

Samples 0.4.2 — 2026-11-11

The reference LAME of ctLame (bin/*/lame, the reduced LAME 4.0) has its ID3 tags and its ReplayGain analysis back, with the same tag options as ctLame. Both programs now take the same command line: lame -V 2 input.wav and ctLame -V 2 input.wav write the same bytes, ReplayGain and tags included, as unmodified LAME 4.0 does. The core and the library stay 0.4.0.

  • Benchmarks still run without ReplayGain, now with --noreplaygain for both programs; the published numbers are unchanged. The benchmark script measures both with ReplayGain on request (-ReplayGain).
  • ctLame 0.2.1 prints --genre-list to stderr, as LAME does; its output files are unchanged.

Samples 0.4.1 — 2026-11-11

A release of the encoders in ThinkMeta.ConcurrentTasks.Samples only; the core and the library stay 0.4.0.

  • ctLame 0.2.0 writes ID3 tags (version 1 and 2.3, LAME's options --tt, --ta, --tl, --ty, --tc, --tn, --tg, --tv, --ti and the others of --help id3) and the ReplayGain of the input into the LAME tag, like unmodified LAME 4.0 and bit-identical to it. ReplayGain is on by default; its analysis runs in one task per channel beside the frame stages. --noreplaygain turns it off and gives the files of the reduced LAME, byte for byte.
  • Benchmarks run without ReplayGain (--noreplaygain): the reduced LAME, which ctLame is compared with, has none. The published numbers are unchanged; with ReplayGain ctLame takes about 29 % longer on 16 threads.
  • ctOpus 0.1.4, ctDeflate 0.1.4 and ctJpeg 0.1.3 print their version and copyright at the head of their help, as ctLame does; their output files are unchanged.

0.4.0 — 2026-11-06

ThinkMeta ConcurrentTasks runs on Linux (x64) as well as on Windows. The core's interface is now the same on both platforms: version 2 of the ABI (SchedulerVersion 2). Programs built against 0.3.x must be rebuilt for the 0.4.0 core, and a few names of the library changed. See Requirements and Set up a project.

Linux

  • The core ships as libThinkMeta.ConcurrentTasks.Core.so.2 in Core/bin/linux-x64. It needs only the C library (glibc 2.34 or later) and runs tasks on its own context switch, like the DLL.
  • The Windows core moved next to it, one folder per platform: Core/bin/win-x64 (the DLL), Core/lib/win-x64 (the import library) and Core.Release.win-x64.manifest.json. Projects that import Core/ThinkMeta.ConcurrentTasks.Core.props need no change.
  • Asynchronous files and sockets run on io_uring; Linux 5.19 or later is recommended. Without io_uring, EnableAsyncIo returns false and everything else works.
  • Timers wait for absolute deadlines of the monotonic clock on the kernel's high-resolution timers.
  • The library builds with clang 19 or later, CMake 3.28 or later and Ninja. The repository has a CMakeLists.txt for the library, its tests and the samples, and cmake/ holds the configuration for find_package(ThinkMeta.ConcurrentTasks) in your own projects.

Scheduler core

  • Breaking: ABI version 2. Core.h no longer includes Windows.h (it still does on Windows for the I/O block, with NOMINMAX set first) and uses fixed-width types throughout. Tasks are linked through ListEntry, which has the layout of SLIST_ENTRY on Windows. Thread callbacks get the thread as a NativeThread.
  • SchedulerInfo has a new field taskStackSize: the stack size of the tasks, 0 for the platform's default.
  • On Linux the asynchronous I/O goes through SubmitIo, CancelIo and CancelAllIo with an IoRequest per operation; on Windows nothing changed.
  • ConcurrentStack is the library's own lock-free stack on both platforms instead of the Windows SList.

C++ module library

  • A platform layer with one set of names for portable code: Platform::File with FileOptions (access, creation, unbuffered, share modes), Error and ErrorCode, Platform::VirtualMemory, Platform::Mutex, and for sockets Socket, SocketError, SocketErrorCode and SocketShutdown. The error codes are Win32 and Winsock codes on Windows and errno values on Linux.
  • AsyncFile::Create, ReadFile and WriteFile take a FileOptions; on Windows the overloads with the parameters of CreateFileW stay.
  • Breaking: byte counts are std::uint32_t on Windows too (ByteCount, formerly DWORD): AsyncFile, the request classes and the forms of AsyncSocket that exist on both platforms (Recv, Send, RecvAsync, SendAsync with one buffer). The Windows-only overloads (WSABUF, WSAMSG, AcceptEx/ConnectEx buffers, TransmitFile) keep DWORD.
  • Breaking: the blocking IP and TCP sockets moved from Windows to the new namespace Net (Net::IpSocket4, Net::TcpSocket4, IpSocketBase, TcpSocketBase, IpVersion, IpTraits; modules ThinkMeta.ConcurrentTasks.Net.IpSocket and .Net.TcpSocket). Their option values are std::uint32_t instead of DWORD.
  • Breaking: AsyncIoRequestBase::FromOverlapped is now FromNativeRequest.

Samples

  • The samples of this documentation and the tutorial run on Linux as well and use the portable names (Platform::Error, FileOptions, SocketError, main). Hashing, Bluetooth devices and the UI-thread and thread-callback guides stay Windows-only.
  • ctLame 0.1.4, ctOpus 0.1.3, ctDeflate 0.1.3 and ctJpeg 0.1.2 are rebuilt for the 0.4.0 core; their output is unchanged, byte for byte.
  • The four encoders in ThinkMeta.ConcurrentTasks.Samples run on Linux as well: prebuilt programs in bin/linux-x64/ next to bin\win-x64\, a CMake build, and verification scripts with a reference table per platform. On Linux they write the same files as their references built there. The Linux programs link libstdc++ in and need glibc 2.38 or later (Ubuntu 24.04, Debian 13, Fedora 39, RHEL 10 or newer); the benchmark scripts are Windows only for now.

0.3.1 — 2026-11-01

A bug-fix release of the C++ module library. The core DLL is unchanged (still 0.3.0); rebuild your program to pick up the fixes.

C++ module library

  • AutoResetEvent_s: a Set on an event that was already set could, rarely, leave the waiter suspended for good. The waiter took the signal but did not yet see what the setting thread had written before that second Set, checked its condition, and waited again. Affected all earlier versions.
  • MediaFoundation::Await compiles when _NO_SYS_GUID_OPERATOR_EQ_ is defined: it compares interface IDs with IsEqualGUID instead of ==.

Samples

  • ctLame 0.1.3, ctOpus 0.1.2 and ctDeflate 0.1.2 are rebuilt with the event fix; their output is unchanged. ctJpeg does not use the event and stays 0.1.1.

0.3.0 — 2026-11-01

A feature release with breaking changes: tasks can be cancelled. Waits now report why they ended, and some names changed. SchedulerVersion stays 1, but programs built against 0.2.x must be rebuilt for the 0.3.0 core DLL: SuspendTaskFor returns a different type, and CancelTimedTask is gone. See Cancelling tasks.

Scheduler core

C++ module library

0.2.0 — 2026-10-30

A feature release: schedulers for threads with an event loop of their own, such as UI threads, and waiting for Windows Runtime operations. The core gains new entry points; the existing ones are unchanged (SchedulerVersion stays 1), so programs built against 0.1.x run with the 0.2.0 core DLL. Programs that use the new entry points need the 0.2.0 core DLL.

Scheduler core

C++ module library

  • Schedulers::DispatcherScheduler owns a dispatcher scheduler and posts its tasks to a window.
  • Tasks::RunAndWait runs a callable on another scheduler and waits for it.
  • Task::Schedule takes a scheduler, to hand work to another scheduler than the calling task's.
  • WaitableLambdaTask and WaitableLambdaTask_s run a callable and can be waited for. WaitableTask::Create and WaitableTask_s::Create build them. These replace Task::Create, which returns a task that cannot be waited for.
  • WinRT::Await waits for an asynchronous Windows Runtime operation (C++/WinRT IAsyncAction, IAsyncOperation and their …WithProgress variants) by suspending the calling task. See WinRT operations and the Bluetooth devices sample.

0.1.2 — 2026-10-29

A maintenance release with the fixes of a second code review of the core and the library. The core's interface is unchanged (SchedulerVersion stays 1): programs built against 0.1.1 run with the 0.1.2 core DLL. Rebuild them anyway to get the library fixes, which are compiled into your program.

Scheduler core

  • A timed task that is moved, started early with ScheduleTimedTask or cancelled with CancelTimedTask while it is still being added no longer waits for the next timer due.
  • A scheduler thread no longer goes to sleep while another thread is taking a task from the same queue and further tasks are queued.
  • AssociateHandleWithIoCompletionPort without a completion routine sets ERROR_INVALID_PARAMETER, as documented.

C++ module library

  • TaskGroup_s reused round after round by the same waiter: Wait no longer returns early on a resume left over from the previous round; a timed Wait waits on for the time that is left.
  • OrderedFileWriter: a writer task scheduled before Open uses the segment size given to Open.
  • The waiting helpers of the sockets accept only the single-waiter requests, the only ones they can serve.
  • BoundedPointerQueue: Dequeue returns nullptr only when the queue is empty.
  • The remarks of Semaphore_s and AutoResetEvent name two pitfalls: two tasks taking turns on one Semaphore_s permit, and simultaneous Set calls.

0.1.1 — 2026-10-19

A maintenance release with the fixes of a full code review of the core and the library. The core's interface is unchanged (SchedulerVersion stays 1): programs built against 0.1 run with the 0.1.1 core DLL. Rebuild them anyway to get the library fixes, which are compiled into your program.

Scheduler core

  • The core no longer has a heap: schedulers and task contexts live in pages taken straight from the virtual memory manager. Destroying a scheduler now also releases the fiber stacks of tasks that were still queued or waiting.
  • AddTask with the default priority works from any thread, as documented; from a thread that is no task it used to crash.
  • Stop no longer depends on a second wake-up round and waits only for threads that were actually started.
  • The task-swap scheduler switches to the other task when the running one yields, from either slot.
  • ConvertThreadToTask is documented as once per thread.

C++ module library

  • TaskGroup, ManualResetEvent and WaitableTask: a waiter is no longer woken a second time by a resume that belonged to an earlier round, and the remarks state when the objects may be destroyed after a wait.
  • SpscVirtualMemoryPipe: the last block before the end of the stream is no longer lost.
  • StreamedFileReader and OrderedFileWriter: reusing a request right after its wait no longer picks up the completion of the previous operation; the writer publishes its progress before it wakes the writing task.
  • AsyncFile: reading and writing without buffering handles a last block that is not a multiple of the sector size.
  • Sockets: failed asynchronous operations report the same WSAE… codes as synchronous ones; Close keeps the socket if closesocket fails; Accept copies only the reported address length.
  • Error::WaitTimedOut for the WAIT_TIMEOUT of Thread::Wait and the completion port.

Samples

  • Samples: snippets show whole declarations and functions.
  • The encoders in ThinkMeta.ConcurrentTasks.Samples were reviewed: clearer task graphs with a section on reading the code, error handling, tests for the graph edges, and ctOpus encodes 48 kHz input in parallel as well.

0.1 — 2026-10-11

The first public version.

Scheduler core

  • Scheduler that runs tasks on fibers, with two priorities and a configurable task queue capacity (taskQueueCapacity).
  • Timers on a high-resolution timer thread: tasks by time, sleeping tasks and waits with a timeout.
  • An I/O completion port and I/O thread in the core for asynchronous I/O.
  • Thread callbacks when scheduler threads start and stop.
  • Threads as tasks: ordinary threads can wait on the same primitives as tasks.
  • Ships as a release build that imports nothing but KERNEL32 and the API set behind WaitOnAddress.

C++ module library

Platform

  • Windows 10 or later, x64, built with Visual Studio 2026 and C++ modules — see Requirements.

What comes next

The Roadmap shows what we are working on.