Parallel programming in Meadow.OS is essentially the same as any other .NET enabled platform. Meadow fully supports System.Threading
and System.Threading.Tasks
as well as the underlying Task Parallel Library methods.
For example code using these technologies, see the following samples in the Meadow.Core.Samples repo:
BeginInvokeOnMainThread
The MeadowOS
class has a BeginInvokeOnMainThread
method that enables code to be put into a queue to be executed on the main thread:
Task.Run(() => {
MeadowOS.BeginInvokeOnMainThread(() => {
...
});
});