You can make asynchronous code predictable if you utilize something like TLA+, or treat the code as a protocol system.