fix severval bug

1.Abandoned syste lock,use atom
2.Fix map & hashmap foreach function deaklock
3.Fix event