unity3d multi threading helper class with two examples, for indie devs. bring good to the world etc.!
we have an array of 10 grandmas, with an age of 60, 62, 64, 66, 68, 70, 72, 74, 76, 78. we like to increment the age of every grandma by 1. because we're in a hurry, we use multi-threading and process those 10 grandma items with more cores.
all files should be well commented. for advanced topics like generics: see links in class or below.
advanced topics:
- c# interfaces: http://www.codeproject.com/Articles/18743/Interfaces-in-C-For-Beginners
- c# generics: http://msdn.microsoft.com/en-us/library/ms379564(v=vs.80).aspx
- c# delegates: http://msdn.microsoft.com/en-us/library/ms173171(v=vs.80).aspx
how to:
- open project folder
- press play
- check debug.log
- we see 10 numbers (age of all grandmas + 1)
- we see two examples
example 1:
- long, but easier example
- check code for details
example 2:
- short, but advaned example
- check code for details
copyright: well, i don't care. do whatever you as long it helps you and others. nothing special about this code.
for questions: rafael@btxsqdr.com and http://twitter.com/btxsqdr