comparison in separate thread