mirror of https://github.com/OpenRCT2/OpenRCT2.git
Explicitly use std::launch::async
This commit is contained in:
parent
6e6fe3c3c1
commit
3334d40da4
|
@ -545,7 +545,7 @@ static void server_list_fetch_servers_begin()
|
|||
_serverList.ReadAndAddFavourites();
|
||||
_statusText = STR_SERVER_LIST_CONNECTING;
|
||||
|
||||
_fetchFuture = std::async([] {
|
||||
_fetchFuture = std::async(std::launch::async, [] {
|
||||
// Spin off background fetches
|
||||
auto lanF = _serverList.FetchLocalServerListAsync();
|
||||
auto wanF = _serverList.FetchOnlineServerListAsync();
|
||||
|
|
|
@ -237,7 +237,7 @@ bool ServerList::WriteFavourites(const std::vector<ServerListEntry>& entries)
|
|||
std::future<std::vector<ServerListEntry>> ServerList::FetchLocalServerListAsync(const INetworkEndpoint& broadcastEndpoint)
|
||||
{
|
||||
auto broadcastAddress = broadcastEndpoint.GetHostname();
|
||||
return std::async([broadcastAddress] {
|
||||
return std::async(std::launch::async, [broadcastAddress] {
|
||||
constexpr auto RECV_DELAY_MS = 10;
|
||||
constexpr auto RECV_WAIT_MS = 2000;
|
||||
|
||||
|
@ -287,7 +287,7 @@ std::future<std::vector<ServerListEntry>> ServerList::FetchLocalServerListAsync(
|
|||
|
||||
std::future<std::vector<ServerListEntry>> ServerList::FetchLocalServerListAsync()
|
||||
{
|
||||
return std::async([&] {
|
||||
return std::async(std::launch::async, [&] {
|
||||
// Get all possible LAN broadcast addresses
|
||||
auto broadcastEndpoints = GetBroadcastAddresses();
|
||||
|
||||
|
|
Loading…
Reference in New Issue