MCPcopy Create free account
hub / github.com/AdaCompNUS/summit / Post

Method Post

LibCarla/source/carla/ThreadPool.h:40–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38 /// Post a task to the pool.
39 template <typename FunctorT, typename ResultT = typename std::result_of<FunctorT()>::type>
40 std::future<ResultT> Post(FunctorT &&functor) {
41 auto task = std::packaged_task<ResultT()>(std::forward<FunctorT>(functor));
42 auto future = task.get_future();
43 _io_context.post(carla::MoveHandler(task));
44 return future;
45 }
46
47 /// Launch threads to run tasks asynchronously. Launch specific number of
48 /// threads if @a worker_threads is provided, otherwise use all available

Callers 1

TESTFunction · 0.80

Calls 1

MoveHandlerFunction · 0.85

Tested by 1

TESTFunction · 0.64