Society of Robots - Robot Forum

Software => Software => Topic started by: obiwanjacobi on May 06, 2013, 12:43:27 AM

Title: [Code Share] Simple lightweight cooperative multi-tasking code
Post by: obiwanjacobi on May 06, 2013, 12:43:27 AM
Just something I ran into and thought may be of use to others.

Read this article: http://msdn.microsoft.com/en-us/magazine/jj553509.aspx (http://msdn.microsoft.com/en-us/magazine/jj553509.aspx)

It describes a method of using some macros to setup a switch statement that allows you to yield and resume a 'Task'.
Its the most lightweight implementation I have ever seen.

Hope it helps.