Added the 'run' method who is in charge of the infinite loop

Signed-off-by: Djomanix <johan.kayser@viacesi.fr>
Updated the example with 'run' method

Signed-off-by: Djomanix <johan.kayser@viacesi.fr>