Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unix support #15

Merged
merged 1 commit into from
Apr 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,7 @@ else()
target_include_directories(arcana INTERFACE "Source/Android")
elseif(APPLE)
target_include_directories(arcana INTERFACE "Source/Apple")
elseif(UNIX)
target_include_directories(arcana INTERFACE "Source/Unix")
endif()
endif()
23 changes: 23 additions & 0 deletions Source/Unix/arcana/threading/task_schedulers.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//

#pragma once

namespace arcana
{
// NOTE: These task schedulers are for the arcana task system.

namespace
{
// TOOD: this is a stop gap for platforms that don't have a threadpool implementation
constexpr struct
{
template<typename CallableT>
void operator()(CallableT&& callable) const
{
std::thread([callable{ std::forward<CallableT>(callable) }]() { callable(); }).detach();
}
} threadpool_scheduler{};
}
}