Thread support for REPL