LGFae / swww

A Solution to your Wayland Wallpaper Woes
GNU General Public License v3.0
2.38k stars 70 forks source link

Nuke multithreading #352

Closed LGFae closed 3 months ago

LGFae commented 3 months ago

This transforms our multithreaded daemon into a single-threaded one.

This is the culmination of various big refactors I worked on since the last release. In particular, this is only possible because:

  1. of the great improvements we've made in making transitions more efficient on a single core, so that they can now be done in the same thread as everything else; and
  2. of our custom written wayland code, that makes it unnecessary to have Arc<Mutex> everywhere.

Without either of those, this refactor either wouldn't work or wouldn't bring many tangible benefits. But, because of them, this will make the daemon as efficient as it gets, as we are no longer spawning superfluous threads everywhere and keeping them in sync through locks and a weird polling system. It also completely eliminates any race conditions within the daemon (though race conditions related to the compositor or daemon-client interaction will remain).