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

ThinkMeta ConcurrentTasks

ThinkMeta ConcurrentTasks is a task scheduler for Windows that runs tasks on fibers. A task can wait — for another task, an event, a lock, a file read or a socket — without blocking its OS thread: the thread simply runs the next task. A handful of threads keep all cores busy while thousands of tasks wait.

What you get

A first look

// The main thread becomes a task too, so it can wait without blocking a
// scheduler thread.
TC::ConvertThreadToTask();

// One scheduler thread per logical processor (numberOfThreads = 0).
TC::SchedulerInfo   info{};
TC::ITaskScheduler* scheduler
    = TC::CreateTaskScheduler(TC::SchedulerKind::Default, &info);
if (scheduler == nullptr)
    return 1;
scheduler->Start();

HelloTask task; // must outlive the task: from AddTask until it has exited
scheduler->AddTask(&task);
task.Wait(); // suspends main until Run has returned

scheduler->Stop(); // only after every task has finished
scheduler->Destroy();
TC::ConvertTaskToThread();
return 0;

The whole program is on Your first program.

Performance first

The core and the library are built for speed, not to be watertight against misuse: lifetimes, queue capacities and single-waiter rules are the developer's responsibility. Read Performance first before you build on it.

Where to go next

If you want to … Read
understand what it is and when it pays off What is ConcurrentTasks?, When to use it
build and run something Getting started
know how it works Concepts
solve a concrete problem Guides and Samples
look up a type or function API reference