perl plugin: Mark thread as running to avoid deadlock moved from perl_shutdown()...