Fix bug in Semaphore.NamedProducerConsumer test
Fix bug in Semaphore.NamedProducerConsumer test

The test schedules two tasks, each of which creates a Semaphore with the same name.  One of the tasks releases count into the semaphore, and the other consumes it via WaitOne.  If the first task ends up creating the semaphore first, there's no problem: the first task will end up blocking, and the second task will end up creating the same semaphore and releasing count into it.  But if the second task ends up executing first, it could create the semaphore, release count into it, and destroy the semaphore, all before the first task constructs the semaphore.  If that happens, the first task will construct an entirely different semaphore, and end up blocking until timeout, at which point the test will fail.

This fix introduces a barrier that ensures neither task waits or releases until both tasks have constructed the shared semaphore.

nbarbettini/corefx,manu-silicon/corefx,krk/corefx,fgreinacher/corefx,lydonchandra/corefx,uhaciogullari/corefx,s0ne0me/corefx,kkurni/corefx,gregg-miskelly/corefx,ravimeda/corefx,SGuyGe/corefx,jeremymeng/corefx,kkurni/corefx,zmaruo/corefx,gabrielPeart/corefx,huanjie/corefx,690486439/corefx,gregg-miskelly/corefx,jeremymeng/corefx,andyhebear/corefx,BrennanConroy/corefx,alexperovich/corefx,the-dwyer/corefx,zhenlan/corefx,MaggieTsang/corefx,mazong1123/corefx,khdang/corefx,marksmeltzer/corefx,ptoonen/corefx,gkhanna79/corefx,Jiayili1/corefx,ericstj/corefx,ericstj/corefx,ravimeda/corefx,Priya91/corefx-1,s0ne0me/corefx,chaitrakeshav/corefx,vrassouli/corefx,elijah6/corefx,josguil/corefx,pallavit/corefx,dotnet-bot/corefx,ericstj/corefx,nchikanov/corefx,shahid-pk/corefx,Jiayili1/corefx,anjumrizwi/corefx,Jiayili1/corefx,anjumrizwi/corefx,larsbj1988/corefx,stone-li/corefx,shmao/corefx,rjxby/corefx,rajansingh10/corefx,tijoytom/corefx,ellismg/corefx,iamjasonp/corefx,bitcrazed/corefx,shimingsg/corefx,gregg-miskelly/corefx,Frank125/corefx,zhenlan/corefx,s0ne0me/corefx,ericstj/corefx,n1ghtmare/corefx,twsouthwick/corefx,pgavlin/corefx,ptoonen/corefx,SGuyGe/corefx,rahku/corefx,dhoehna/corefx,gabrielPeart/corefx,stone-li/corefx,khdang/corefx,elijah6/corefx,vidhya-bv/corefx-sorting,lggomez/corefx,seanshpark/corefx,akivafr123/corefx,khdang/corefx,rahku/corefx,chaitrakeshav/corefx,shmao/corefx,dhoehna/corefx,tijoytom/corefx,mazong1123/corefx,seanshpark/corefx,jcme/corefx,ptoonen/corefx,fgreinacher/corefx,alphonsekurian/corefx,thiagodin/corefx,dhoehna/corefx,rahku/corefx,PatrickMcDonald/corefx,krytarowski/corefx,rjxby/corefx,twsouthwick/corefx,ViktorHofer/corefx,comdiv/corefx,Ermiar/corefx,jhendrixMSFT/corefx,jhendrixMSFT/corefx,benjamin-bader/corefx,Ermiar/corefx,weltkante/corefx,n1ghtmare/corefx,vs-team/corefx,tstringer/corefx,jhendrixMSFT/corefx,stone-li/corefx,ravimeda/corefx,larsbj1988/corefx,alexandrnikitin/corefx,Petermarcu/corefx,fgreinacher/corefx,kkurni/corefx,wtgodbe/corefx,wtgodbe/corefx,akivafr123/corefx,Petermarcu/corefx,DnlHarvey/corefx,rajansingh10/corefx,shahid-pk/corefx,dsplaisted/corefx,nchikanov/corefx,tijoytom/corefx,nbarbettini/corefx,krytarowski/corefx,cydhaselton/corefx,zhenlan/corefx,jlin177/corefx,shahid-pk/corefx,rahku/corefx,kyulee1/corefx,huanjie/corefx,alexperovich/corefx,heXelium/corefx,ViktorHofer/corefx,tstringer/corefx,DnlHarvey/corefx,alexandrnikitin/corefx,cartermp/corefx,kkurni/corefx,Petermarcu/corefx,the-dwyer/corefx,690486439/corefx,PatrickMcDonald/corefx,mellinoe/corefx,adamralph/corefx,Ermiar/corefx,vidhya-bv/corefx-sorting,Ermiar/corefx,PatrickMcDonald/corefx,Alcaro/corefx,cydhaselton/corefx,tijoytom/corefx,yizhang82/corefx,zhangwenquan/corefx,zhangwenquan/corefx,ravimeda/corefx,MaggieTsang/corefx,weltkante/corefx,cnbin/corefx,DnlHarvey/corefx,mmitche/corefx,elijah6/corefx,benpye/corefx,JosephTremoulet/corefx,Priya91/corefx-1,n1ghtmare/corefx,krk/corefx,shimingsg/corefx,ViktorHofer/corefx,billwert/corefx,manu-silicon/corefx,dhoehna/corefx,stone-li/corefx,parjong/corefx,parjong/corefx,alexandrnikitin/corefx,stormleoxia/corefx,rjxby/corefx,wtgodbe/corefx,mellinoe/corefx,jlin177/corefx,jeremymeng/corefx,rjxby/corefx,akivafr123/corefx,jhendrixMSFT/corefx,nbarbettini/corefx,tstringer/corefx,ellismg/corefx,rubo/corefx,richlander/corefx,kyulee1/corefx,ravimeda/corefx,zhangwenquan/corefx,ptoonen/corefx,billwert/corefx,janhenke/corefx,benpye/corefx,ViktorHofer/corefx,ravimeda/corefx,mafiya69/corefx,ellismg/corefx,mokchhya/corefx,matthubin/corefx,mellinoe/corefx,benpye/corefx,Chrisboh/corefx,nelsonsar/corefx,vs-team/corefx,ViktorHofer/corefx,gkhanna79/corefx,shmao/corefx,benjamin-bader/corefx,gabrielPeart/corefx,krk/corefx,vidhya-bv/corefx-sorting,anjumrizwi/corefx,iamjasonp/corefx,janhenke/corefx,Ermiar/corefx,pgavlin/corefx,Ermiar/corefx,cartermp/corefx,pgavlin/corefx,PatrickMcDonald/corefx,dkorolev/corefx,parjong/corefx,SGuyGe/corefx,krytarowski/corefx,shmao/corefx,Alcaro/corefx,thiagodin/corefx,Yanjing123/corefx,dotnet-bot/corefx,cartermp/corefx,dtrebbien/corefx,iamjasonp/corefx,DnlHarvey/corefx,twsouthwick/corefx,kyulee1/corefx,gkhanna79/corefx,zhenlan/corefx,Chrisboh/corefx,MaggieTsang/corefx,lggomez/corefx,elijah6/corefx,Chrisboh/corefx,adamralph/corefx,DnlHarvey/corefx,seanshpark/corefx,yizhang82/corefx,jcme/corefx,Priya91/corefx-1,zmaruo/corefx,ellismg/corefx,zhenlan/corefx,mellinoe/corefx,shimingsg/corefx,PatrickMcDonald/corefx,alexandrnikitin/corefx,marksmeltzer/corefx,shana/corefx,bitcrazed/corefx,Alcaro/corefx,stephenmichaelf/corefx,tstringer/corefx,dtrebbien/corefx,pallavit/corefx,lggomez/corefx,stephenmichaelf/corefx,khdang/corefx,lggomez/corefx,mokchhya/corefx,the-dwyer/corefx,KrisLee/corefx,ericstj/corefx,ellismg/corefx,viniciustaveira/corefx,yizhang82/corefx,jhendrixMSFT/corefx,marksmeltzer/corefx,fgreinacher/corefx,twsouthwick/corefx,zmaruo/corefx,thiagodin/corefx,rubo/corefx,jlin177/corefx,akivafr123/corefx,axelheer/corefx,elijah6/corefx,MaggieTsang/corefx,mmitche/corefx,oceanho/corefx,nchikanov/corefx,parjong/corefx,twsouthwick/corefx,seanshpark/corefx,benpye/corefx,gregg-miskelly/corefx,billwert/corefx,josguil/corefx,alexperovich/corefx,mokchhya/corefx,YoupHulsebos/corefx,Petermarcu/corefx,alphonsekurian/corefx,weltkante/corefx,YoupHulsebos/corefx,nelsonsar/corefx,larsbj1988/corefx,matthubin/corefx,yizhang82/corefx,Frank125/corefx,kkurni/corefx,krk/corefx,marksmeltzer/corefx,jcme/corefx,CherryCxldn/corefx,nbarbettini/corefx,cydhaselton/corefx,tijoytom/corefx,akivafr123/corefx,690486439/corefx,MaggieTsang/corefx,Petermarcu/corefx,cydhaselton/corefx,comdiv/corefx,marksmeltzer/corefx,josguil/corefx,ptoonen/corefx,shahid-pk/corefx,dtrebbien/corefx,shahid-pk/corefx,rubo/corefx,weltkante/corefx,zhenlan/corefx,larsbj1988/corefx,axelheer/corefx,uhaciogullari/corefx,josguil/corefx,shmao/corefx,Petermarcu/corefx,mokchhya/corefx,vidhya-bv/corefx-sorting,stormleoxia/corefx,Jiayili1/corefx,dsplaisted/corefx,marksmeltzer/corefx,pallavit/corefx,jhendrixMSFT/corefx,Chrisboh/corefx,mafiya69/corefx,Priya91/corefx-1,stephenmichaelf/corefx,JosephTremoulet/corefx,SGuyGe/corefx,ericstj/corefx,brett25/corefx,dsplaisted/corefx,Ermiar/corefx,dotnet-bot/corefx,DnlHarvey/corefx,twsouthwick/corefx,BrennanConroy/corefx,vs-team/corefx,cydhaselton/corefx,wtgodbe/corefx,JosephTremoulet/corefx,dhoehna/corefx,nbarbettini/corefx,stone-li/corefx,dkorolev/corefx,JosephTremoulet/corefx,KrisLee/corefx,Yanjing123/corefx,brett25/corefx,gkhanna79/corefx,mmitche/corefx,alphonsekurian/corefx,tijoytom/corefx,pallavit/corefx,vrassouli/corefx,nchikanov/corefx,pallavit/corefx,weltkante/corefx,mellinoe/corefx,iamjasonp/corefx,Chrisboh/corefx,MaggieTsang/corefx,manu-silicon/corefx,janhenke/corefx,manu-silicon/corefx,benjamin-bader/corefx,stephenmichaelf/corefx,YoupHulsebos/corefx,n1ghtmare/corefx,lggomez/corefx,richlander/corefx,rubo/corefx,the-dwyer/corefx,jhendrixMSFT/corefx,rajansingh10/corefx,nchikanov/corefx,YoupHulsebos/corefx,nchikanov/corefx,shimingsg/corefx,ptoonen/corefx,billwert/corefx,shmao/corefx,690486439/corefx,khdang/corefx,MaggieTsang/corefx,alexperovich/corefx,uhaciogullari/corefx,iamjasonp/corefx,manu-silicon/corefx,brett25/corefx,Yanjing123/corefx,wtgodbe/corefx,billwert/corefx,mazong1123/corefx,shana/corefx,rajansingh10/corefx,krk/corefx,Jiayili1/corefx,benpye/corefx,KrisLee/corefx,stormleoxia/corefx,seanshpark/corefx,nbarbettini/corefx,yizhang82/corefx,vrassouli/corefx,lydonchandra/corefx,CloudLens/corefx,the-dwyer/corefx,krytarowski/corefx,richlander/corefx,richlander/corefx,mafiya69/corefx,nbarbettini/corefx,janhenke/corefx,viniciustaveira/corefx,dtrebbien/corefx,ViktorHofer/corefx,krk/corefx,dhoehna/corefx,dotnet-bot/corefx,rubo/corefx,heXelium/corefx,shrutigarg/corefx,uhaciogullari/corefx,alphonsekurian/corefx,SGuyGe/corefx,pallavit/corefx,DnlHarvey/corefx,parjong/corefx,benjamin-bader/corefx,anjumrizwi/corefx,richlander/corefx,Jiayili1/corefx,vs-team/corefx,huanjie/corefx,tstringer/corefx,CloudLens/corefx,rahku/corefx,janhenke/corefx,mazong1123/corefx,jmhardison/corefx,krk/corefx,ravimeda/corefx,mazong1123/corefx,mafiya69/corefx,rjxby/corefx,zmaruo/corefx,shimingsg/corefx,bitcrazed/corefx,jcme/corefx,oceanho/corefx,richlander/corefx,mafiya69/corefx,Priya91/corefx-1,alexperovich/corefx,thiagodin/corefx,stone-li/corefx,jlin177/corefx,BrennanConroy/corefx,shrutigarg/corefx,andyhebear/corefx,alphonsekurian/corefx,benjamin-bader/corefx,Jiayili1/corefx,iamjasonp/corefx,chaitrakeshav/corefx,axelheer/corefx,lydonchandra/corefx,stephenmichaelf/corefx,parjong/corefx,CherryCxldn/corefx,alexperovich/corefx,rjxby/corefx,benpye/corefx,690486439/corefx,jeremymeng/corefx,rjxby/corefx,shimingsg/corefx,s0ne0me/corefx,stone-li/corefx,CloudLens/corefx,ellismg/corefx,josguil/corefx,oceanho/corefx,jlin177/corefx,mokchhya/corefx,matthubin/corefx,alexandrnikitin/corefx,jmhardison/corefx,matthubin/corefx,dotnet-bot/corefx,nelsonsar/corefx,dkorolev/corefx,axelheer/corefx,axelheer/corefx,cartermp/corefx,CloudLens/corefx,stephenmichaelf/corefx,twsouthwick/corefx,iamjasonp/corefx,mmitche/corefx,Petermarcu/corefx,n1ghtmare/corefx,the-dwyer/corefx,YoupHulsebos/corefx,mazong1123/corefx,lggomez/corefx,janhenke/corefx,Chrisboh/corefx,axelheer/corefx,cnbin/corefx,richlander/corefx,tstringer/corefx,seanshpark/corefx,gabrielPeart/corefx,wtgodbe/corefx,chaitrakeshav/corefx,jmhardison/corefx,wtgodbe/corefx,heXelium/corefx,jeremymeng/corefx,JosephTremoulet/corefx,elijah6/corefx,bitcrazed/corefx,khdang/corefx,dkorolev/corefx,shana/corefx,rahku/corefx,mmitche/corefx,comdiv/corefx,YoupHulsebos/corefx,marksmeltzer/corefx,jlin177/corefx,dhoehna/corefx,kyulee1/corefx,brett25/corefx,gkhanna79/corefx,zhangwenquan/corefx,manu-silicon/corefx,CherryCxldn/corefx,huanjie/corefx,tijoytom/corefx,shrutigarg/corefx,jlin177/corefx,Frank125/corefx,krytarowski/corefx,parjong/corefx,yizhang82/corefx,vrassouli/corefx,nchikanov/corefx,jmhardison/corefx,alexperovich/corefx,weltkante/corefx,cnbin/corefx,comdiv/corefx,jcme/corefx,stephenmichaelf/corefx,cydhaselton/corefx,Alcaro/corefx,kkurni/corefx,Frank125/corefx,andyhebear/corefx,JosephTremoulet/corefx,shmao/corefx,mokchhya/corefx,lggomez/corefx,shahid-pk/corefx,josguil/corefx,dotnet-bot/corefx,manu-silicon/corefx,cartermp/corefx,JosephTremoulet/corefx,heXelium/corefx,nelsonsar/corefx,mellinoe/corefx,viniciustaveira/corefx,rahku/corefx,krytarowski/corefx,mazong1123/corefx,Priya91/corefx-1,ptoonen/corefx,alphonsekurian/corefx,jcme/corefx,gkhanna79/corefx,ViktorHofer/corefx,adamralph/corefx,shimingsg/corefx,shana/corefx,bitcrazed/corefx,the-dwyer/corefx,mmitche/corefx,cydhaselton/corefx,cartermp/corefx,Yanjing123/corefx,billwert/corefx,YoupHulsebos/corefx,billwert/corefx,weltkante/corefx,dotnet-bot/corefx,mmitche/corefx,gkhanna79/corefx,alphonsekurian/corefx,ericstj/corefx,zhenlan/corefx,seanshpark/corefx,viniciustaveira/corefx,KrisLee/corefx,yizhang82/corefx,vidhya-bv/corefx-sorting,krytarowski/corefx,cnbin/corefx,mafiya69/corefx,Yanjing123/corefx,stormleoxia/corefx,shrutigarg/corefx,benjamin-bader/corefx,pgavlin/corefx,oceanho/corefx,lydonchandra/corefx,CherryCxldn/corefx,elijah6/corefx,SGuyGe/corefx,andyhebear/corefx