I think your description works, but I think the closer parallel is synchronous vs asynchronous learning. Synchronous means the students and teachers are in the same place at the same time, whereas asynchronous means they’re not and the students can learn on their own time.
With code, the same place means the same thread. Synchronous code all runs in the same thread whereas asynchronous code doesn’t. The thread could be an explicit thread created by the program or some event handler, the result is the same.