Concurrency is the ability to perform more than one task at the same time. Let’s say you have a WSN mote with multiple sensor devices. You want to sense through all the sensors at the same time.
Typically, we can achieve concurrency by applying a queue that is either FIFO (First In First Out) or LIFO (Last In First Out). Another solution is to apply asynchronous code in our program.
In Contiki-NG, it provides us concurrency features by using several approaches to develop application-based concurrency. There are four methods with which we can implement concurrency in Contiki-NG applications, as follows: