HomeWildfire Games

pthread -> std::thread (4/7) - Replace pthread in remaining files

Description

pthread -> std::thread (4/7) - Replace pthread in remaining files

This removes pthread mutexes/threads from:

  • vfs
  • the resource handler manager
  • timer
  • the network server.

This allows removing it from our general posix include header.

Differential Revision: https://code.wildfiregames.com/D1920

Event Timeline

elexis raised a concern with this commit.EditedAug 16 2019, 2:59 AM
elexis added a subscriber: elexis.

Main Menu -> Host Game -> Back -> Segfault upon NetServer delete

First I thought its the patch I was about to commit.
Then I thought its the GUI patches.
Took me three hours of compiling and looking the diff in my working copy for the bug, then bisecting and compiling to find that its just 4 revisions ago. :/

This commit now has outstanding concerns.Aug 16 2019, 2:59 AM
elexis removed an auditor: elexis.Aug 16 2019, 7:48 PM

Thanks for the excursion. One should probably check whether there are other calls that need a join instead of a detach, or that miss it completely like this one did, or whether joinable() safeguards are missing (and whether every modified code actually works)

This commit no longer requires audit.Aug 16 2019, 7:48 PM
vladislavbelov added inline comments.
/ps/trunk/source/lib/file/vfs/vfs.cpp
160

Fixes N13 from #5288.