LPS-34419 Run Ruby code in an isolated thread to prevent leaking.