Correctly set running flag of CodeProcessor

Fixes warnings on shutdown when new code was compiled.