Permalink
Browse files

Move the complete library to stlab/concurrency

  • Loading branch information...
FelixPetriconi committed Jun 5, 2017
1 parent 00725f7 commit fdbfacb5700e2b7a0bffc6dd00a6854a9f571fdc
View
@@ -5,39 +5,35 @@ project(stlab C CXX)
set(CMAKE_SKIP_RPATH OFF)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
#set(CMAKE_CXX_FLAGS "-g -Wall -O3 -std=c++14 -fsanitize=thread -fexceptions -D_GLIBCXX_USE_CXX11_ABI=0")
set(CMAKE_CXX_FLAGS "-O3 -g -Wall -std=c++14 -fexceptions -ftemplate-backtrace-limit=0 -D_GLIBCXX_USE_CXX11_ABI=0")
set(CMAKE_LINK_FLAGS "-pthreads")
SET (CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS_INIT} $ENV{LDFLAGS})
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
#set(CMAKE_CXX_FLAGS "-g -Wall -O3 -std=c++14 -fsanitize=thread -fexceptions -D_GLIBCXX_USE_CXX11_ABI=0")
set(CMAKE_CXX_FLAGS "-O3 -g -Wall -std=c++14 -fexceptions -ftemplate-backtrace-limit=0 -D_GLIBCXX_USE_CXX11_ABI=0")
set(CMAKE_LINK_FLAGS "-pthreads")
SET (CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS_INIT} $ENV{LDFLAGS})
endif()
set (Boost_MULTITHREADED ON)
set (Boost_MULTITHREADED ON)
if(WIN32)
add_definitions(-D_WIN32_WINNT=0x0601)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
add_definitions(-D_WIN32_WINNT=0x0601)
set(Boost_USE_STATIC_LIBS ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
else()
set (Boost_USE_STATIC_LIBS ON)
endif(WIN32)
if(EXISTS ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
set(CONAN_SYSTEM_INCLUDES ON)
conan_basic_setup()
else()
if(MSVC)
set(Boost_USE_STATIC_LIBS TRUE)
endif()
find_package(Boost 1.60.0 COMPONENTS unit_test_framework)
if(UNIX)
add_definitions("-DBOOST_TEST_DYN_LINK")
endif()
include_directories(SYSTEM ${Boost_INCLUDE_DIR})
link_directories(${Boost_LIBRARY_DIR})
endif()
set (Boost_MULTITHREADED ON)
set (Boost_MULTITHREADED ON)
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
@@ -50,4 +46,4 @@ endif()
include_directories(.)
add_subdirectory(test)
add_subdirectory(playground)
add_subdirectory(playground)
View
@@ -19,7 +19,7 @@ Once they're set up, run either `setup_xcode.sh` or `setup_msvc.bat` for the pla
# Build Status: [![Build Status](https://travis-ci.org/stlab/libraries.svg?branch=develop)](https://travis-ci.org/stlab/libraries)
## <stlab/future>
## <stlab/concurrency/future>
This is a proof of concept implementation of a packaged task and future to replace the standard components. This is a list of some of the differences from standard (as of C++17) and boost (as of boost 1.60.0):
@@ -13,10 +13,9 @@ include_directories(${Boost_INCLUDE_DIRS})
target_link_libraries(
playground
# future
${Boost_SYSTEM_LIBRARY}
${Boost_THREAD_LIBRARY}
${CMAKE_THREAD_LIBS_INIT})
${Boost_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
${CONAN_LIBS})
set_property(TARGET playground PROPERTY CXX_STANDARD 14)
View
@@ -13,9 +13,7 @@ struct IUnknown;
#include <sstream>
#include <utility>
#include <stlab/channel.hpp>
#include <stlab/default_executor.hpp>
#include <stlab/future.hpp>
#include <stlab/concurrency/concurrency.hpp>
using namespace stlab;
using namespace std;
@@ -239,8 +237,7 @@ void activeProgressExample()
#include <tuple>
#include <iostream>
#include <stlab/future.hpp>
#include <stlab/channel.hpp>
#include <stlab/concurrency/concurrency.hpp>
using namespace stlab;
using namespace std;
View
@@ -6,23 +6,17 @@ include_directories("${PROJECT_SOURCE_DIR}/..")
#)
set(HEADERS
../stlab/channel.hpp
../stlab/config.hpp
../stlab/default_executor.hpp
../stlab/executor_base.hpp
../stlab/expected.hpp
../stlab/future.hpp
../stlab/immediate_executor.hpp
../stlab/main_executor.hpp
../stlab/progress.hpp
../stlab/traits.hpp
../stlab/tuple_algorithm.hpp
../stlab/system_timer.hpp
../stlab/utility.hpp)
../stlab/concurrency/channel.hpp
../stlab/concurrency/config.hpp
../stlab/concurrency/default_executor.hpp
../stlab/concurrency/executor_base.hpp
../stlab/concurrency/future.hpp
../stlab/concurrency/immediate_executor.hpp
../stlab/concurrency/main_executor.hpp
../stlab/concurrency/progress.hpp
../stlab/concurrency/system_timer.hpp
../stlab/concurrency/traits.hpp
../stlab/concurrency/tuple_algorithm.hpp
../stlab/concurrency/utility.hpp)
include_directories(${Boost_INCLUDE_DIRS})
#add_library(future ${SOURCE} ${HEADERS})
#set_property(TARGET future PROPERTY CXX_STANDARD 14)
#set_property(TARGET future PROPERTY CXX_STANDARD_REQUIRED ON)
@@ -22,9 +22,9 @@
#include <boost/optional.hpp>
#include <boost/variant.hpp>
#include <stlab/executor_base.hpp>
#include <stlab/traits.hpp>
#include <stlab/tuple_algorithm.hpp>
#include "executor_base.hpp"
#include "traits.hpp"
#include "tuple_algorithm.hpp"
#ifdef max
@@ -0,0 +1,22 @@
/*
Copyright 2017 Adobe
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
/**************************************************************************************************/
#ifndef STLAB_CONCURRENCY_HPP
#define STLAB_CONCURRENCY_HPP
#include "channel.hpp"
#include "default_executor.hpp"
#include "executor_base.hpp"
#include "future.hpp"
#include "immediate_executor.hpp"
#include "main_executor.hpp"
#include "system_timer.hpp"
#include "utility.hpp"
#endif
File renamed without changes.
File renamed without changes.
@@ -9,7 +9,7 @@
#include <chrono>
#include <functional>
#include <stlab/system_timer.hpp>
#include "system_timer.hpp"
/**************************************************************************************************/
@@ -17,9 +17,9 @@
#include <vector>
#include <boost/optional.hpp>
#include <stlab/config.hpp>
#include <stlab/executor_base.hpp>
#include <stlab/traits.hpp>
#include "config.hpp"
#include "executor_base.hpp"
#include "traits.hpp"
/**************************************************************************************************/
@@ -27,7 +27,7 @@ struct immediate_executor
}
template <typename F>
void operator()(std::chrono::system_clock::time_point, && f) {
void operator()(std::chrono::system_clock::time_point, F&& f) {
std::forward<F>(f)();
}
};
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -19,7 +19,7 @@
#endif
#include <stlab/default_executor.hpp>
#include "default_executor.hpp"
/**************************************************************************************************/
View
@@ -21,18 +21,18 @@ set(SOURCE
)
set(HEADERS
../stlab/channel.hpp
../stlab/config.hpp
../stlab/default_executor.hpp
../stlab/executor_base.hpp
../stlab/future.hpp
../stlab/immediate_executor.hpp
../stlab/main_executor.hpp
../stlab/progress.hpp
../stlab/traits.hpp
../stlab/tuple_algorithm.hpp
../stlab/system_timer.hpp
../stlab/utility.hpp
../stlab/concurrency/channel.hpp
../stlab/concurrency/config.hpp
../stlab/concurrency/default_executor.hpp
../stlab/concurrency/executor_base.hpp
../stlab/concurrency/future.hpp
../stlab/concurrency/immediate_executor.hpp
../stlab/concurrency/main_executor.hpp
../stlab/concurrency/progress.hpp
../stlab/concurrency/system_timer.hpp
../stlab/concurrency/traits.hpp
../stlab/concurrency/tuple_algorithm.hpp
../stlab/concurrency/utility.hpp
channel_test_helper.hpp
test_helper.hpp
)
@@ -8,8 +8,7 @@
#include <boost/test/unit_test.hpp>
#include <stlab/channel.hpp>
#include <stlab/future.hpp>
#include <stlab/concurrency/concurrency.hpp>
#include <vector>
@@ -8,8 +8,8 @@
#include <boost/test/unit_test.hpp>
#include <stlab/channel.hpp>
#include <stlab/future.hpp>
#include <stlab/concurrency/concurrency.hpp>
#include <string>
#include "channel_test_helper.hpp"
@@ -8,8 +8,7 @@
#include <boost/test/unit_test.hpp>
#include <stlab/channel.hpp>
#include <stlab/future.hpp>
#include <stlab/concurrency/concurrency.hpp>
#include "channel_test_helper.hpp"
@@ -8,8 +8,7 @@
#include <boost/test/unit_test.hpp>
#include <stlab/channel.hpp>
#include <stlab/future.hpp>
#include <stlab/concurrency/concurrency.hpp>
#include <vector>
#include <algorithm>
@@ -9,8 +9,7 @@
#ifndef _CHANNEL_TEST_HELPER_
#define _CHANNEL_TEST_HELPER_
#include <stlab/channel.hpp>
#include <stlab/default_executor.hpp>
#include <stlab/concurrency/concurrency.hpp>
#include <queue>
#include <thread>
View
@@ -8,8 +8,7 @@
#include <boost/test/unit_test.hpp>
#include <stlab/channel.hpp>
#include <stlab/future.hpp>
#include <stlab/concurrency/concurrency.hpp>
#include "channel_test_helper.hpp"
@@ -8,8 +8,7 @@
#include <boost/test/unit_test.hpp>
#include <stlab/channel.hpp>
#include <stlab/future.hpp>
#include <stlab/concurrency/concurrency.hpp>
#include <string>
@@ -7,7 +7,8 @@
/**************************************************************************************************/
#include <boost/test/unit_test.hpp>
#include <stlab/future.hpp>
#include <stlab/concurrency/concurrency.hpp>
#include "test_helper.hpp"
View
@@ -8,7 +8,8 @@
#include <boost/test/unit_test.hpp>
#include <boost/mpl/list.hpp>
#include <stlab/future.hpp>
#include <stlab/concurrency/concurrency.hpp>
#include "test_helper.hpp"
@@ -7,7 +7,8 @@
/**************************************************************************************************/
#include <boost/test/unit_test.hpp>
#include <stlab/future.hpp>
#include <stlab/concurrency/concurrency.hpp>
#include "test_helper.hpp"
@@ -7,7 +7,9 @@
/**************************************************************************************************/
#include <boost/test/unit_test.hpp>
#include <stlab/future.hpp>
#include <stlab/concurrency/concurrency.hpp>
#include <string>
#include "test_helper.hpp"
@@ -7,7 +7,8 @@
/**************************************************************************************************/
#include <boost/test/unit_test.hpp>
#include <stlab/future.hpp>
#include <stlab/concurrency/concurrency.hpp>
#include "test_helper.hpp"
@@ -6,9 +6,12 @@
/**************************************************************************************************/
#include <array>
#include <boost/test/unit_test.hpp>
#include <stlab/future.hpp>
#include <stlab/concurrency/concurrency.hpp>
#include <array>
#include "test_helper.hpp"
@@ -6,9 +6,12 @@
/**************************************************************************************************/
#include <array>
#include <boost/test/unit_test.hpp>
#include <stlab/future.hpp>
#include <stlab/concurrency/concurrency.hpp>
#include <array>
#include "test_helper.hpp"
Oops, something went wrong.

0 comments on commit fdbfacb

Please sign in to comment.