536b83a1a8
Motivation: We should keep the scope of the synchronized block as small as possible. Modifications: Reduce scope by copy to an array first before iterate through it Result: Smaller scope of synchronized