base: do not allow unnamed threads

fix #901