Part of setting up a microcontroller when writing a piece of firmware usually involves configuring its connections to the ...
You mostly do not need to worry about pitfalls of concurrent processing (races, deadlocks, livelocks, resource sharing, etc.). The fact of cooperative processing takes care of such issues by design.