add basic threaded server support and switch erosion to use that