Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
When the Moon is full it was possible to have a dead-lock in task scheduler's exit() method. Similar problem was fixed in Blender's task scheduler 3 years ago in bae2a2c.
bae2a2c