TeamForbiddenLLC / warfork-qfusion

Warfork is powered by Qfusion a 3D game engine. Qfusion is a fork of id Tech 2, popularly known as the Quake II engine. Qfusion is free and open-source software subject to the terms of the GNU General Public License.
https://warfork.com
109 stars 43 forks source link

feat: fix heartbeat and added guard when writing to pipe #376

Closed pollend closed 4 months ago

pollend commented 4 months ago

the writes to the pipe are atomic but if you have

thread 1 AA           A     A
thread 2       B            B

so the buffer sent over the pipe is getting corrupted by the heartbeat thread. i just add a mutex to grantee mutual exclusion when writing to the pipe.