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

Set up a project

A project needs three things: the core (header, import library, DLL), the module library, and the latest C++ language standard.

1. Import the core

Core\ThinkMeta.ConcurrentTasks.Core.props adds the include directory for Core.h, links the import library and copies ThinkMeta.ConcurrentTasks.Core.dll next to your executable. Import it in your .vcxproj after Microsoft.Cpp.props:

<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<Import Project="path\to\ThinkMeta.ConcurrentTasks\Core\ThinkMeta.ConcurrentTasks.Core.props" />

All configurations use the same release build of the core. It does not depend on the C runtime, so it works in debug builds as well.

2. Reference the library

Add the library project to your solution and reference it, so its modules are built and their interfaces are visible to your code:

<ItemGroup>
  <ProjectReference Include="path\to\ThinkMeta.ConcurrentTasks\Library\ThinkMeta.ConcurrentTasks\ThinkMeta.ConcurrentTasks.vcxproj">
    <Project>{8193c4f2-ccac-4ba7-ad92-ab1a2fad14a2}</Project>
  </ProjectReference>
</ItemGroup>

3. Use the latest C++ standard

In the project properties set C/C++ › Language › C++ Language Standard to Preview – Features from the Latest C++ Working Draft (/std:c++latest), for both configurations.

4. Include and import

Every source file that uses ConcurrentTasks includes the core header and imports the modules it needs:

#include <Windows.h>
#include <ThinkMeta.ConcurrentTasks/Core.h>

import ThinkMeta.ConcurrentTasks.Tasks.WaitableTask;
import ThinkMeta.ConcurrentTasks.Synchronization.Semaphore;

namespace TC = ThinkMeta::ConcurrentTasks;

Each reference page names the module to import under Use. The examples in this documentation abbreviate the namespace as TC.

Next

Your first program.