is presently its sole maintainer,
You can support him:
Blackboard: Thread Synchronization / Communication
Blackboard: Problem #1 - Knowing what work to do
Blackboard: Problem #2 - Sync / When work is done / visible
Blackboard: Conceptualising how threads work
Blackboard: Doing a busy-wait loop
Blackboard: Preventing multiple threads from doing the same work
Blackboard: x64 provides special instructions
Blackboard: "locked exchange"
Blackboard: "interlocked compare exchange"
Put on the Pig Hat
Blackboard: Being slyfox with the other primitives (!quote 96)
Blackboard: "reads and writes" in a multithreaded context
Blackboard: cache lines
Take off the Pig Hat and open the code
win32_handmade.cpp: Make four threads that do different work
Run Handmade Hero
Make the threads look for work to do
Run and inspect the debug output
Moment of realisation: You need to let ThreadInfo values persist
Inspect the output
Explain what's happening
The writes to EntryCount are not in order
The reads are not in order
tenbroya Q: Is your use of "for (;;)" instead of "while(1)" a stylistic choice or is there a benefit / drawback I'm missing?
gasto5 Q: What's the problem with not being interlocked and seeing the same value, as your "TODO" suggests?
Blackboard: Why two threads did the same work
quikligames Q: Do mutexes that I've seen used for multithreaded code in other places rely on those interlocking instructions, or are they something completely different?
emanresuon Q: What is your opinion on lockless queues?
sedihglow Q: What's the point of an infinite loop to begin with? It ends at some point, doesn't it?
my_twitch_sn Q: What threading libraries do you recommend and why (e.g. boost or pthreads)?
lavisan Q: What's better: a job scheduler from where each thread can get a job, or separate queues for each thread?
Blackboard: "Single producer / Single consumer" vs "Single producer / Multiple consumer"
pseudonym73 Q: I think that the point of "lockless" is that it doesn't use an operating system-level lock
Blackboard: "lock free"
rygorous Q: Hey Casey, an InterlockedIncrement is a lock-free operation! (The terminology is shitty. The original term is "non-blocking" which is more useful)
gasto5 Q: Is it reasonable to synchronize the receiving of network packets on one synchronized thread?
cubercaleb Q: Later in the development cycle, will you go over threading for other operating systems like Mac and Linux?
rc1290 Q: What are the advantages of having a queue of jobs, instead of creating a thread every time you add a job?
Blackboard: Overlap vs Performance
Recap and glimpse into the future
Close things down