You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dp::thread_pool pool;
auto value = 8;
auto future = pool.enqueue([](int& x) { x *= 2; }, std::ref(value));
future.wait();
dp::thread_pool should support this use case.
With the upcoming std::future updates and extensions (i.e. std::when_all, std::when_any) we may not need #27. Though, having something built in to the class would save on memory usage since users would presumably have to store std::future<void> in a list of some sort (i.e. std::vector<>).
The text was updated successfully, but these errors were encountered:
Currently it's not possible to do the following:
dp::thread_pool
should support this use case.With the upcoming
std::future
updates and extensions (i.e.std::when_all
,std::when_any
) we may not need #27. Though, having something built in to the class would save on memory usage since users would presumably have to storestd::future<void>
in a list of some sort (i.e.std::vector<>
).The text was updated successfully, but these errors were encountered: