Thanks for the advice, Simon, Martin, and Kaspar! For now, I'll use a mutex together with thread_flags. Using message passing, as Simon suggested, would work for me as well; the reason I find thread_flags preferable is that I need to block application threads that call send() and receive(), that may already be using message passing.
If people don't mind, and they think it would be useful, I'm also willing to contribute a lightweight condition variable to the core module. I think it could be implemented simply as a queue, just like the current mutex implementation. Sam On Wed, Aug 17, 2016 at 10:19 AM, Kaspar Schleiser <[email protected]> wrote: > Hey, > > On 08/16/2016 09:49 PM, Sam Kumar wrote: > > If not, I want to learn if there is another structured way to > > block a thread until an event, that I should use instead. > > maybe thread_flags work for your use-case. > > Kaspar > _______________________________________________ > devel mailing list > [email protected] > https://lists.riot-os.org/mailman/listinfo/devel >
_______________________________________________ devel mailing list [email protected] https://lists.riot-os.org/mailman/listinfo/devel
