同步代码块:有synchronized关键字修饰的代码块。 注意,同步是一种高开销的操作,因此应该尽量减少同步的内容。通常没有必要同步整个方法,只需要用synchronized修饰关键代码即可。