Reduce the iterations in the iothread test to something more reasonable.
Remove an unnecessary lock.