no need to iterate for zero length map.

also it will cause a deadlock at the end of map, collection the return values