So I found another answer http://answers.unity3d.com/questions/255647/Yield-vs-update.html
Which explained a bunch, but I’m about to pry even deeper. I watched the Intermediate Video on using Co-Routines and in the comments, he said “It’s much faster to use Yield than to re-initialize everything”, unfortunately that is everything I know about that.
So when I see a yield in a return statement (I come from C++), first, I have to get used to it (I realize there are ways to code that are better in Unity3D I should accept, so I won’t argue that). However, I want to know what this does.
In Fork(), I only know a bit, but it seems that “The process is copied, including any active registers/ram use” (quotes mean paraphrase here btw). I’m not a comp sci major, so this is what I’ve skimmed on other answer sites and a book on OS’s that I read up to threads.
So does yield copy the process? Does it need the sigaction to handle its zombies, which is why the other answer (link above) mentions gc? Also I only know about sigaction from Beej’s guide to network programming . I’m not an expert.
However, I am aware the OS has “signals” it sends and you can respond to them, probably not a Unity3D thing though.
Finally, and this might be out of scope for Unity3D forums, is what does Fork() do exactly? So if I yield, and it’s the same thing with a coroutine, does it really copy the whole process over? I realize the bulk of the program is the media, but I used to think of programs as one thing, that loops or goes wherever, but this threading thing makes me think it’s just a series of “runnable functions”, that sleep, wake up, split/fork and come back whenever, and I’m having a harder time grasping what a program is vs a process, and how this relates to whether it’s more efficient to use a coroutine or just reinitialize the variables.
And that, was how I brought this back to Unity3D discussion. However, feel free to say “For the other half, head to Stack-O and ask that there”