quasar / Quasar

Remote Administration Tool for Windows
MIT License
8.36k stars 2.38k forks source link

Remove lock (_lockClients) #1215

Closed nil-ref closed 9 months ago

nil-ref commented 9 months ago

Problem description

Can "lock (_lockClients)" be omitted because it is always in the UI thread and called by lstClients.Invoke.

Proposal

Remove lock (_lockClients)

Additional context

No response

MaxXor commented 9 months ago

When two clients connect simultaneously it needs to be ensured via the lock that the clients list is only modified one at a time (same for disconnects). But there may be better ways to handle this. Currently it is not safe to remove it.