[console] Make clear and refresh thread safe