As we know, C#’s built-in thread model does not support the passing of return values from one thread back to the “parent” thread that created it. I’m implementing a small compiler for matrix calculations in C#. Compiler generates IL code using System.Reflection.Emit name space. For this compiler I’m planning to implement call-return semantics. Can somebody point out to me a suitable technique to implement call-return semantics using C# Thread (or any other technique)?
As we know, C#’s built-in thread model does not support the passing of return
Share
Have a look at the Task<T> Class:
Example 1: Start a new task and wait for the task to complete
Example 2: Start a new task and continue with action when the task completes