OpenBoard-org / OpenBoard

OpenBoard is a cross-platform interactive whiteboard application intended for use in a classroom setting.
https://openboard.ch/
GNU General Public License v3.0
2.34k stars 423 forks source link

fix(UBNetworkAccessManager): Use atomic_int instead of volatile #1048

Open Vekhir opened 1 month ago

Vekhir commented 1 month ago

volatile is intended for hardware interaction, where changes might not be obvious from the given code, disabling certain compiler features. The intended use is atomic operations, so use that instead.

There are other uses of volatile which probably mean to be atomic, but they are mostly in the recording section which I can't really test, don't want to test, and since they don't create warnings should probably be left alone.

Resolves warning 5 of #1046