mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-27 00:34:46 +01:00
Explicitly use std::launch::async
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user