#pragma once\r
\r
#include "../exception/win32_exception.h"\r
+#include "../exception/exceptions.h"\r
#include "../utility/string.h"\r
#include "../utility/move_on_copy.h"\r
#include "../log/log.h"\r
template<typename Func>\r
auto begin_invoke(Func&& func, task_priority priority = normal_priority) -> boost::unique_future<decltype(func())> // noexcept\r
{ \r
+ if(!is_running_)\r
+ BOOST_THROW_EXCEPTION(invalid_operation() << msg_info("executor not running."));\r
+\r
// Create a move on copy adaptor to avoid copying the functor into the queue, tbb::concurrent_queue does not support move semantics.\r
auto task_adaptor = make_move_on_copy(create_task(func));\r
\r