mirror of
https://github.com/Pumpkin-MC/Pumpkin.git
synced 2026-08-30 20:14:23 +00:00
world: change player list to rwlock (#550)
This commit is contained in:
@@ -87,7 +87,7 @@ impl Context {
|
||||
};
|
||||
|
||||
for world in self.server.worlds.read().await.iter() {
|
||||
for player in world.players.lock().await.values() {
|
||||
for player in world.players.read().await.values() {
|
||||
client_suggestions::send_c_commands_packet(player, &self.server.command_dispatcher)
|
||||
.await;
|
||||
}
|
||||
@@ -105,7 +105,7 @@ impl Context {
|
||||
};
|
||||
|
||||
for world in self.server.worlds.read().await.iter() {
|
||||
for player in world.players.lock().await.values() {
|
||||
for player in world.players.read().await.values() {
|
||||
client_suggestions::send_c_commands_packet(player, &self.server.command_dispatcher)
|
||||
.await;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user