[riot-users] Parallel threads
kaspar at schleiser.de
Wed May 23 14:08:07 CEST 2018
On 05/14/2018 12:29 PM, Janna Om wrote:
> i‘m trying to emulate parallel thread execution to send and receive messages simultaneously in my application.
which board are you using?
> I have two threads. The main thread with priority 7. It creates and sends messages in while loop with gnrc_netapi_send() function.
> The second receiver thread has priority 6 and receives messages in while loop with function msg_receive().
> When the application running, there is no context switch. There are only messages sent from the first thread,
> or only messages received from the second thread, depending on what starts first.
> Currently I solved the problem by calling xtimer_sleep() function after after gnrc_netapi_send().
> Is there a better solution to achieve the parallel execution emulation?
Hard to debug without seeing the code. Would you be able to share the
More information about the users