(Wangle) Fix possible race in updating FSM state
(Wangle) Fix possible race in updating FSM state

Summary: Storing the new state could be a memory race according to C++ (but wasn't in practice). I only checked GCC though.

Reviewed By: @nbronson

Differential Revision: D2189287

fw1121/folly,mqeizi/folly,kernelim/folly,constantine001/folly,nickhen/folly,bikong2/folly,loversInJapan/folly,PoisonBOx/folly,bowlofstew/folly,guker/folly,upsoft/folly,charsyam/folly,guker/folly,tomhughes/folly,constantine001/folly,Eagle-X/folly,charsyam/folly,Eagle-X/folly,constantine001/folly,bikong2/folly,guker/folly,reddit/folly,fw1121/folly,fw1121/folly,rklabs/folly,KSreeHarsha/folly,wildinto/folly,zhiweicai/folly,Orvid/folly,kernelim/folly,fw1121/folly,renyinew/folly,stonegithubs/folly,bobegir/folly,zhiweicai/folly,doctaweeks/folly,KSreeHarsha/folly,bikong2/folly,floxard/folly,mqeizi/folly,mqeizi/folly,constantine001/folly,guker/folly,brunomorishita/folly,clearlylin/folly,facebook/folly,tempbottle/folly,gaoyingie/folly,colemancda/folly,SeanRBurton/folly,brunomorishita/folly,renyinew/folly,PPC64/folly,bobegir/folly,PPC64/folly,xzmagic/folly,Eagle-X/folly,lifei/folly,chjp2046/folly,raphaelamorim/folly,PoisonBOx/folly,upsoft/folly,floxard/folly,sakishum/folly,Orvid/folly,sakishum/folly,chjp2046/folly,KSreeHarsha/folly,SammyK/folly,cole14/folly,alexst07/folly,wildinto/folly,Hincoin/folly,chjp2046/folly,zhiweicai/folly,brunomorishita/folly,loversInJapan/folly,bowlofstew/folly,clearlylin/folly,Orvid/folly,gavioto/folly,arg0/folly,bowlofstew/folly,gavioto/folly,PoisonBOx/folly,SammyK/folly,bowlofstew/folly,theiver9827/folly,reddit/folly,theiver9827/folly,juniway/folly,tomhughes/folly,juniway/folly,lifei/folly,kernelim/folly,leolujuyi/folly,arg0/folly,mqeizi/folly,yangjin-unique/folly,arg0/folly,SammyK/folly,hongliangzhao/folly,Hincoin/folly,rklabs/folly,PPC64/folly,zhiweicai/folly,CJstar/folly,shaobz/folly,wildinto/folly,stonegithubs/folly,colemancda/folly,bowlofstew/folly,Orvid/folly,tempbottle/folly,facebook/folly,sonnyhu/folly,alexst07/folly,yangjin-unique/folly,sonnyhu/folly,SeanRBurton/folly,leolujuyi/folly,lifei/folly,gavioto/folly,bobegir/folly,SammyK/folly,bobegir/folly,reddit/folly,gaoyingie/folly,gaoyingie/folly,renyinew/folly,Eagle-X/folly,sakishum/folly,leolujuyi/folly,sakishum/folly,sonnyhu/folly,facebook/folly,xzmagic/folly,alexst07/folly,raphaelamorim/folly,arg0/folly,theiver9827/folly,brunomorishita/folly,zhiweicai/folly,hongliangzhao/folly,tempbottle/folly,cole14/folly,colemancda/folly,alexst07/folly,CJstar/folly,xzmagic/folly,gavioto/folly,mqeizi/folly,gavioto/folly,loversInJapan/folly,cole14/folly,renyinew/folly,gaoyingie/folly,juniway/folly,shaobz/folly,cole14/folly,SeanRBurton/folly,rklabs/folly,stonegithubs/folly,bobegir/folly,colemancda/folly,CJstar/folly,Hincoin/folly,alexst07/folly,upsoft/folly,constantine001/folly,tempbottle/folly,sonnyhu/folly,hongliangzhao/folly,loversInJapan/folly,fw1121/folly,tomhughes/folly,KSreeHarsha/folly,floxard/folly,hongliangzhao/folly,shaobz/folly,CJstar/folly,sakishum/folly,brunomorishita/folly,chjp2046/folly,rklabs/folly,sonnyhu/folly,gaoyingie/folly,nickhen/folly,PoisonBOx/folly,doctaweeks/folly,doctaweeks/folly,charsyam/folly,floxard/folly,doctaweeks/folly,leolujuyi/folly,renyinew/folly,stonegithubs/folly,shaobz/folly,kernelim/folly,tempbottle/folly,nickhen/folly,yangjin-unique/folly,clearlylin/folly,PPC64/folly,charsyam/folly,wildinto/folly,reddit/folly,stonegithubs/folly,tomhughes/folly,bikong2/folly,guker/folly,leolujuyi/folly,xzmagic/folly,facebook/folly,lifei/folly,raphaelamorim/folly,clearlylin/folly,tomhughes/folly,kernelim/folly,juniway/folly,raphaelamorim/folly,floxard/folly,juniway/folly,Hincoin/folly,loversInJapan/folly,theiver9827/folly,raphaelamorim/folly,chjp2046/folly,upsoft/folly,theiver9827/folly,lifei/folly,rklabs/folly,Orvid/folly,cole14/folly,doctaweeks/folly,hongliangzhao/folly,reddit/folly,colemancda/folly,shaobz/folly,nickhen/folly,arg0/folly,yangjin-unique/folly,Eagle-X/folly,Hincoin/folly,yangjin-unique/folly,SeanRBurton/folly,PPC64/folly,xzmagic/folly,SeanRBurton/folly,wildinto/folly,SammyK/folly,upsoft/folly,PoisonBOx/folly,facebook/folly,clearlylin/folly,CJstar/folly,nickhen/folly,KSreeHarsha/folly,bikong2/folly