0

This talk was done in 2015: https://www.gdcvault.com/play/1022186/Parallelizing-the-Naughty-Dog-Engine concerning threading your program via fibers. In it, he talks about how msvc has a fiber specific optimization that helps to avoid some assumptions by the compiler that would potentially make your fiber architecture unstable. He also mentioned at that time that clang did not have the same optimization support. I checked the clang compiler flags and didn't see anything pop out concerning this and wondered if anyone knew about if fibers can be used with clang without any special tricks (which are also noted in the talk 24:08).

Jason
  • 2,198
  • 3
  • 23
  • 59
  • All compilers support thread-local variables. Also, you shouldn't be using fibers anymore, standard C++ has full support of awaitable tasks now! – Blindy Sep 09 '22 at 16:35
  • Ya, the issue wasn't to do with thread-local variables, it was with how the compiler would optimize things and cache addresses to threads that would cause problems with a fiber based architecture (explained in the video above at this time stamp 24:40). And actually I'm going to be using a c codebase instead of c++ (even though I tagged c++ lol) – Jason Sep 09 '22 at 17:42

0 Answers0