No problems with this!
There are actually a few RTOS around that work on the Arduino Boards. Checkout fat16lib's porting of for instance ChibiOS. https://github.com/greiman?tab=repositories
But first let us step back and look at the hardware. In a broader sense multi-tasking is already going on even in the Arduino core. The AVR MCUs contain a number of hardware modules that can be run concurrently with the processor. Some examples; ADC, UART, SPI, TWI, Watchdog, Timer, etc.
In Cosa I have implemented several methods of achieving multi-threading; periodic functions, state-machines, proto-threads and coroutines. Below are links to example sketches;https://github.com/mikaelpatel/Cosa/blob/master/examples/Blink/CosaBlinkPeriodic/CosaBlinkPeriodic.inohttps://github.com/mikaelpatel/Cosa/blob/master/examples/Blink/CosaBlinkFSM/CosaBlinkFSM.inohttps://github.com/mikaelpatel/Cosa/blob/master/examples/Blink/CosaBlinkProtoThread/CosaBlinkProtoThread.inohttps://github.com/mikaelpatel/Cosa/blob/master/examples/Blink/CosaBlinkThread/CosaBlinkThread.ino
The Cosa Nucleo (multi-threading) Blink example sketch uses three threads; LED that does the blink, Controller that changes the blink frequency, and the main thread that performs low-power sleep while waiting to the next time event. The sketch is possible to run on an ATtiny84 with only 512 bytes of SRAM.