Robin2:
I was reading a little about the ESP8266 in the last few days and it occurred to me that it must do something like that.The picture in my mind is that there are two CPUs - {W} running the WiFi and {A} running the Arduino code - such as the "Blink" program and {A} can communicate with {W} as needed. A bit like the Arduino and the Linux sides of a Yun.
Do you have a link where that is explained more clearly / more extensively. I did not see anything when I was searching myself.
...R
The Official word on the Arduino timeslice is here. That recommends 20mS but the RF section seems to function OK even if 50mS is consumed ... like any specification, things can be stretched a weebit.
The Reference section is going to look very familiar with little deviation from Arduino except board stuff.
About the ESP native time-slice and the Arduino area time-slice...
The ESP8266 SDK ships (today) with a working RTOS implemented but back a couple of years ago, the SDK was incomplete.
While the Arduino code was being developed, a task switcher known as NonOS was utilized. NonOS has a low memory footprint, is efficient, but does not provide scheduling, pre-emptive multitasking, or other capabilities of a true RTOS.
The 32-bit RISC core of the ESP8266 is not terribly powerful in terms of today 32-bit offerings. Because the instruction flash is off-chip, there is an instruction cache SRAM implemented which eliminates delays going back & forth to the external flash. The STM32F103 in my testing is superior because of advanced system-level design such as DMA. But, the ESP8266 at $4 is in the same price range as the STM32F103 boards such as the Maple Mini clone and there is more flash and more SRAM on the ESP8266 plus the RF WiFi radio.
Perhaps if the Arduino core were written today, a true RTOS would have been utilized. But, with the programmer following a few basic rules, good C++ performance can be had on the Arduino side and still have the RF side perform. For folks that do not want the RF section at all, it can be turned-off and the ESP8266 can just be a ESP'mini.
Ray