Time - multiplexing - The _threads modules for esp32 is a time-multiplex multi-threading implementation on a single CPU (APP-CPU) where the tasks take turns to run. Let say we have four tasks A , B , C , and D . Each task takes 100 microseconds to complete. If these tasks are arranged to run in sequence A -> B -> C -> D then the whole process will take 400 microseconds. What if we run these tasks concurrently in 4 separate threads, A || B || C || D . How long the process takes to complete? The answer is 400 microseconds also. We have not made our concurrent tasks running any faster. What is the point of multi-threading then? The ability to use multi-threading in our codes will make our programs more responsive to external events. Consider this; let say our threads scheduler allocates a 25-microsecond slot to each running task, in a round-robin style. Each tasks are allocated 4 slots of 25 microseconds. What happen conceptual is like this; A 1|| B 1|| C 1|| ...