The official Arduino team this week announced the introduction of Arduino multitasking and is looking for help from the community by joining the discussion on GitHub. “We’re sharing our API proposal ...
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.