Style nit: space before `{` but not before `}`. Also, the `threadnumber` variable is unused.