Hi Juan, On 06/13/2018 10:27 AM, Juan Ignacio Carrano wrote: >>> Coroutines make it possible to program asynchronous code in a >>> blocking style - see "await". This is more natural and easier that >>> using callbacks. >> How does it compare to sending / receiving messages? >> > > Using messages is OK, but not everything is built that way. Even code > which uses a separate thread that processes messages must use locks. > > Messages require some decoding logic if one is expecting messages from > many senders. I'm thinking of a loop in which one waits for messages and > acts according to the type: what would conceptually be multiple threads > gets squashed into a single chunk of code.
How about we discuss this on actual code? Can you come up with a (maybe hypothetical) piece of code, and we see what would be the best way to express it in RIOT, or if more API would help? Kaspar _______________________________________________ devel mailing list [email protected] https://lists.riot-os.org/mailman/listinfo/devel
