The solution is to not block the thread's event loop.

This looks like there is no need for process() at all, this could just call FLASH_StartFlash() in startFlash()

Cheers,
_