I’m pretty new to game development, and don’t know too much about computers specifically, but one optimization technique I’ve been hearing is threading. I’ve been hearing things like, “Run it on a second thread, which will make it run much faster,” and such and I’ve been given that advice, but have never known what to do with it. What I do know is that its used to optimize and decrease CPU overhead. I’ve sort of pieced together this image that it runs the code separately from the rest of the code because it’s only using certain API to perform its tasks. But I’m not sure if thats right, or if its the complete picture. So I’ve been searching online for a little while and didn’t exactly find the answers I was looking for.
So my question is: what is threading, what is it useful for, and how should I implement it in Unity? Thanks a ton!
This isn’t a Unity question, and so probably isn’t appropriate for this answer site. This is a programming question, and one that has been answered many times in sites like Stack Overflow, not to mention in introductory books on programming or computer science.
Before we answer any questions, I suggest a Google search. Try starting with “programming what is threading” and look at the Wikipedia article, Apple article, Microsoft article, …