Ball valve with internal thread