Add missing lock in CScheduler::AreThreadsServicingQueue()
Add missing lock in CScheduler::AreThreadsServicingQueue()

Not an actual bug as this is only used in asserts right now, but
nice to not have a missing lock.

AkioNak/bitcoin,MarcoFalke/bitcoin,droark/bitcoin,kazcw/bitcoin,Rav3nPL/bitcoin,JeremyRubin/bitcoin,MazaCoin/maza,nbenoit/bitcoin,Kogser/bitcoin,qtumproject/qtum,GroestlCoin/GroestlCoin,Sjors/bitcoin,prusnak/bitcoin,tecnovert/particl-core,nikkitan/bitcoin,destenson/bitcoin--bitcoin,globaltoken/globaltoken,CryptArc/bitcoin,rawodb/bitcoin,romanornr/viacoin,aspanta/bitcoin,droark/bitcoin,TheBlueMatt/bitcoin,mm-s/bitcoin,kevcooper/bitcoin,guncoin/guncoin,joshrabinowitz/bitcoin,jlopp/statoshi,ajtowns/bitcoin,jamesob/bitcoin,romanornr/viacoin,simonmulser/bitcoin,Kogser/bitcoin,rnicoll/dogecoin,sstone/bitcoin,trippysalmon/bitcoin,myriadcoin/myriadcoin,mb300sd/bitcoin,fujicoin/fujicoin,jambolo/bitcoin,kazcw/bitcoin,randy-waterhouse/bitcoin,kallewoof/bitcoin,domob1812/huntercore,fanquake/bitcoin,Friedbaumer/litecoin,alecalve/bitcoin,nikkitan/bitcoin,alecalve/bitcoin,jamesob/bitcoin,mm-s/bitcoin,wangxinxi/litecoin,myriadteam/myriadcoin,Friedbaumer/litecoin,ericshawlinux/bitcoin,maaku/bitcoin,randy-waterhouse/bitcoin,jtimon/bitcoin,CryptArc/bitcoin,bespike/litecoin,stamhe/bitcoin,Chancoin-core/CHANCOIN,fujicoin/fujicoin,pstratem/bitcoin,fujicoin/fujicoin,OmniLayer/omnicore,deeponion/deeponion,r8921039/bitcoin,MeshCollider/bitcoin,sstone/bitcoin,dscotese/bitcoin,shelvenzhou/BTCGPU,gjhiggins/vcoincore,myriadteam/myriadcoin,Gazer022/bitcoin,MazaCoin/maza,GroestlCoin/GroestlCoin,OmniLayer/omnicore,untrustbank/litecoin,tjps/bitcoin,BTCGPU/BTCGPU,ryanofsky/bitcoin,paveljanik/bitcoin,deeponion/deeponion,mruddy/bitcoin,midnightmagic/bitcoin,GroestlCoin/bitcoin,GlobalBoost/GlobalBoost,jambolo/bitcoin,domob1812/namecore,vertcoin/vertcoin,x-kalux/bitcoin_WiG-B,ahmedbodi/vertcoin,romanornr/viacoin,instagibbs/bitcoin,monacoinproject/monacoin,jmcorgan/bitcoin,bitcoinsSG/bitcoin,starwels/starwels,joshrabinowitz/bitcoin,JeremyRubin/bitcoin,TheBlueMatt/bitcoin,ericshawlinux/bitcoin,domob1812/bitcoin,Jcing95/iop-hd,brandonrobertz/namecoin-core,r8921039/bitcoin,namecoin/namecore,1185/starwels,gjhiggins/vcoincore,kevcooper/bitcoin,gmaxwell/bitcoin,trippysalmon/bitcoin,kallewoof/bitcoin,Gazer022/bitcoin,tjps/bitcoin,achow101/bitcoin,randy-waterhouse/bitcoin,anditto/bitcoin,Flowdalic/bitcoin,maaku/bitcoin,digibyte/digibyte,mm-s/bitcoin,Chancoin-core/CHANCOIN,Exgibichi/statusquo,bitcoinknots/bitcoin,deeponion/deeponion,BitzenyCoreDevelopers/bitzeny,n1bor/bitcoin,Exgibichi/statusquo,laudaa/bitcoin,bitcoinknots/bitcoin,wellenreiter01/Feathercoin,n1bor/bitcoin,maaku/bitcoin,alecalve/bitcoin,dscotese/bitcoin,myriadteam/myriadcoin,jmcorgan/bitcoin,instagibbs/bitcoin,MeshCollider/bitcoin,sarielsaz/sarielsaz,1185/starwels,randy-waterhouse/bitcoin,midnightmagic/bitcoin,jamesob/bitcoin,joshrabinowitz/bitcoin,BitzenyCoreDevelopers/bitzeny,peercoin/peercoin,destenson/bitcoin--bitcoin,achow101/bitcoin,ElementsProject/elements,fanquake/bitcoin,tecnovert/particl-core,ElementsProject/elements,Flowdalic/bitcoin,Rav3nPL/bitcoin,gjhiggins/vcoincore,rawodb/bitcoin,stamhe/bitcoin,Anfauglith/iop-hd,gmaxwell/bitcoin,StarbuckBG/BTCGPU,bitbrazilcoin-project/bitbrazilcoin,Bushstar/UFO-Project,RHavar/bitcoin,simonmulser/bitcoin,kazcw/bitcoin,Sjors/bitcoin,digibyte/digibyte,prusnak/bitcoin,Christewart/bitcoin,x-kalux/bitcoin_WiG-B,pstratem/bitcoin,andreaskern/bitcoin,JeremyRubin/bitcoin,afk11/bitcoin,GlobalBoost/GlobalBoost,particl/particl-core,pataquets/namecoin-core,shelvenzhou/BTCGPU,shelvenzhou/BTCGPU,MazaCoin/maza,simonmulser/bitcoin,tecnovert/particl-core,GlobalBoost/GlobalBoost,anditto/bitcoin,GroestlCoin/GroestlCoin,nbenoit/bitcoin,mitchellcash/bitcoin,qtumproject/qtum,Theshadow4all/ShadowCoin,untrustbank/litecoin,RHavar/bitcoin,joshrabinowitz/bitcoin,Sjors/bitcoin,StarbuckBG/BTCGPU,spiritlinxl/BTCGPU,1185/starwels,StarbuckBG/BTCGPU,sarielsaz/sarielsaz,DigitalPandacoin/pandacoin,andreaskern/bitcoin,destenson/bitcoin--bitcoin,spiritlinxl/BTCGPU,UFOCoins/ufo,Theshadow4all/ShadowCoin,sebrandon1/bitcoin,lbryio/lbrycrd,Xekyo/bitcoin,afk11/bitcoin,wangxinxi/litecoin,maaku/bitcoin,myriadteam/myriadcoin,fujicoin/fujicoin,rnicoll/bitcoin,rawodb/bitcoin,ryanofsky/bitcoin,spiritlinxl/BTCGPU,practicalswift/bitcoin,mitchellcash/bitcoin,starwels/starwels,mb300sd/bitcoin,thrasher-/litecoin,gjhiggins/vcoincore,jamesob/bitcoin,GlobalBoost/GlobalBoost,Xekyo/bitcoin,monacoinproject/monacoin,AkioNak/bitcoin,lateminer/bitcoin,alecalve/bitcoin,FeatherCoin/Feathercoin,randy-waterhouse/bitcoin,ElementsProject/elements,BTCGPU/BTCGPU,r8921039/bitcoin,EthanHeilman/bitcoin,starwels/starwels,AkioNak/bitcoin,particl/particl-core,jonasschnelli/bitcoin,sipsorcery/bitcoin,sstone/bitcoin,midnightmagic/bitcoin,shelvenzhou/BTCGPU,cdecker/bitcoin,brandonrobertz/namecoin-core,Exgibichi/statusquo,bitcoin/bitcoin,untrustbank/litecoin,ElementsProject/elements,Kogser/bitcoin,namecoin/namecore,bespike/litecoin,donaloconnor/bitcoin,GroestlCoin/bitcoin,litecoin-project/litecoin,CryptArc/bitcoin,GroestlCoin/GroestlCoin,kevcooper/bitcoin,namecoin/namecore,jnewbery/bitcoin,spiritlinxl/BTCGPU,bitcoinknots/bitcoin,lbryio/lbrycrd,donaloconnor/bitcoin,anditto/bitcoin,h4x3rotab/BTCGPU,jlopp/statoshi,starwels/starwels,cdecker/bitcoin,kevcooper/bitcoin,litecoin-project/litecoin,fanquake/bitcoin,domob1812/bitcoin,peercoin/peercoin,joshrabinowitz/bitcoin,myriadcoin/myriadcoin,bitcoinsSG/bitcoin,viacoin/viacoin,trippysalmon/bitcoin,namecoin/namecoin-core,bitcoinsSG/bitcoin,pstratem/bitcoin,wangxinxi/litecoin,yenliangl/bitcoin,jnewbery/bitcoin,Bushstar/UFO-Project,wellenreiter01/Feathercoin,litecoin-project/litecoin,r8921039/bitcoin,myriadcoin/myriadcoin,destenson/bitcoin--bitcoin,sstone/bitcoin,thrasher-/litecoin,tecnovert/particl-core,viacoin/viacoin,EthanHeilman/bitcoin,1185/starwels,vmp32k/litecoin,Chancoin-core/CHANCOIN,Bushstar/UFO-Project,OmniLayer/omnicore,AkioNak/bitcoin,MarcoFalke/bitcoin,Jcing95/iop-hd,digibyte/digibyte,stamhe/bitcoin,RHavar/bitcoin,lbryio/lbrycrd,bitbrazilcoin-project/bitbrazilcoin,ElementsProject/elements,litecoin-project/litecoin,MarcoFalke/bitcoin,thrasher-/litecoin,achow101/bitcoin,shelvenzhou/BTCGPU,lateminer/bitcoin,apoelstra/bitcoin,jambolo/bitcoin,deeponion/deeponion,Xekyo/bitcoin,jlopp/statoshi,BTCGPU/BTCGPU,vmp32k/litecoin,practicalswift/bitcoin,brandonrobertz/namecoin-core,particl/particl-core,TheBlueMatt/bitcoin,jnewbery/bitcoin,cdecker/bitcoin,laudaa/bitcoin,MarcoFalke/bitcoin,21E14/bitcoin,bitcoinknots/bitcoin,r8921039/bitcoin,jambolo/bitcoin,rnicoll/bitcoin,tecnovert/particl-core,x-kalux/bitcoin_WiG-B,sebrandon1/bitcoin,qtumproject/qtum,CryptArc/bitcoin,destenson/bitcoin--bitcoin,deeponion/deeponion,Friedbaumer/litecoin,namecoin/namecoin-core,jtimon/bitcoin,OmniLayer/omnicore,sebrandon1/bitcoin,destenson/bitcoin--bitcoin,mb300sd/bitcoin,peercoin/peercoin,monacoinproject/monacoin,afk11/bitcoin,vertcoin/vertcoin,kallewoof/bitcoin,aspanta/bitcoin,prusnak/bitcoin,Christewart/bitcoin,h4x3rotab/BTCGPU,wellenreiter01/Feathercoin,paveljanik/bitcoin,wangxinxi/litecoin,Anfauglith/iop-hd,ppcoin/ppcoin,sebrandon1/bitcoin,Friedbaumer/litecoin,monacoinproject/monacoin,BitzenyCoreDevelopers/bitzeny,rawodb/bitcoin,OmniLayer/omnicore,pataquets/namecoin-core,ajtowns/bitcoin,x-kalux/bitcoin_WiG-B,sipsorcery/bitcoin,ericshawlinux/bitcoin,andreaskern/bitcoin,Kogser/bitcoin,gmaxwell/bitcoin,ajtowns/bitcoin,jambolo/bitcoin,BitzenyCoreDevelopers/bitzeny,domob1812/huntercore,domob1812/namecore,MeshCollider/bitcoin,domob1812/huntercore,dscotese/bitcoin,UFOCoins/ufo,spiritlinxl/BTCGPU,nbenoit/bitcoin,DigitalPandacoin/pandacoin,MeshCollider/bitcoin,andreaskern/bitcoin,UFOCoins/ufo,lbryio/lbrycrd,trippysalmon/bitcoin,myriadcoin/myriadcoin,GroestlCoin/GroestlCoin,Bushstar/UFO-Project,romanornr/viacoin,FeatherCoin/Feathercoin,cryptoprojects/ultimateonlinecash,aspanta/bitcoin,JeremyRubin/bitcoin,ajtowns/bitcoin,Sjors/bitcoin,bespike/litecoin,laudaa/bitcoin,practicalswift/bitcoin,viacoin/viacoin,sarielsaz/sarielsaz,jnewbery/bitcoin,myriadcoin/myriadcoin,domob1812/huntercore,trippysalmon/bitcoin,Kogser/bitcoin,kazcw/bitcoin,pataquets/namecoin-core,vertcoin/vertcoin,Anfauglith/iop-hd,Flowdalic/bitcoin,nikkitan/bitcoin,untrustbank/litecoin,guncoin/guncoin,Sjors/bitcoin,simonmulser/bitcoin,aspanta/bitcoin,h4x3rotab/BTCGPU,sarielsaz/sarielsaz,fanquake/bitcoin,Kogser/bitcoin,GroestlCoin/bitcoin,instagibbs/bitcoin,gmaxwell/bitcoin,alecalve/bitcoin,jlopp/statoshi,domob1812/namecore,peercoin/peercoin,ahmedbodi/vertcoin,namecoin/namecoin-core,fanquake/bitcoin,nbenoit/bitcoin,n1bor/bitcoin,Chancoin-core/CHANCOIN,ryanofsky/bitcoin,mm-s/bitcoin,DigitalPandacoin/pandacoin,globaltoken/globaltoken,tjps/bitcoin,rnicoll/dogecoin,DigitalPandacoin/pandacoin,domob1812/bitcoin,particl/particl-core,MarcoFalke/bitcoin,brandonrobertz/namecoin-core,FeatherCoin/Feathercoin,BTCGPU/BTCGPU,wangxinxi/litecoin,dscotese/bitcoin,lbryio/lbrycrd,digibyte/digibyte,jtimon/bitcoin,thrasher-/litecoin,mm-s/bitcoin,Kogser/bitcoin,donaloconnor/bitcoin,vertcoin/vertcoin,monacoinproject/monacoin,fujicoin/fujicoin,cryptoprojects/ultimateonlinecash,cdecker/bitcoin,viacoin/viacoin,deeponion/deeponion,Gazer022/bitcoin,ericshawlinux/bitcoin,guncoin/guncoin,pataquets/namecoin-core,midnightmagic/bitcoin,particl/particl-core,bitcoin/bitcoin,globaltoken/globaltoken,rawodb/bitcoin,BTCGPU/BTCGPU,sstone/bitcoin,pstratem/bitcoin,apoelstra/bitcoin,vmp32k/litecoin,jlopp/statoshi,StarbuckBG/BTCGPU,anditto/bitcoin,kallewoof/bitcoin,Theshadow4all/ShadowCoin,droark/bitcoin,Jcing95/iop-hd,jtimon/bitcoin,Gazer022/bitcoin,andreaskern/bitcoin,kazcw/bitcoin,mm-s/bitcoin,guncoin/guncoin,gjhiggins/vcoincore,namecoin/namecoin-core,donaloconnor/bitcoin,qtumproject/qtum,lbryio/lbrycrd,sipsorcery/bitcoin,rnicoll/bitcoin,maaku/bitcoin,laudaa/bitcoin,yenliangl/bitcoin,jonasschnelli/bitcoin,lateminer/bitcoin,jamesob/bitcoin,GlobalBoost/GlobalBoost,n1bor/bitcoin,wellenreiter01/Feathercoin,instagibbs/bitcoin,sipsorcery/bitcoin,vertcoin/vertcoin,domob1812/huntercore,digibyte/digibyte,GlobalBoost/GlobalBoost,myriadteam/myriadcoin,guncoin/guncoin,MazaCoin/maza,EthanHeilman/bitcoin,Exgibichi/statusquo,EthanHeilman/bitcoin,RHavar/bitcoin,ajtowns/bitcoin,BTCGPU/BTCGPU,dscotese/bitcoin,domob1812/huntercore,maaku/bitcoin,jonasschnelli/bitcoin,practicalswift/bitcoin,midnightmagic/bitcoin,monacoinproject/monacoin,ericshawlinux/bitcoin,viacoin/viacoin,UFOCoins/ufo,UFOCoins/ufo,Bushstar/UFO-Project,bitcoinsSG/bitcoin,jambolo/bitcoin,GroestlCoin/bitcoin,jonasschnelli/bitcoin,shelvenzhou/BTCGPU,brandonrobertz/namecoin-core,Gazer022/bitcoin,Rav3nPL/bitcoin,namecoin/namecore,CryptArc/bitcoin,21E14/bitcoin,wangxinxi/litecoin,21E14/bitcoin,guncoin/guncoin,bitcoinknots/bitcoin,EthanHeilman/bitcoin,brandonrobertz/namecoin-core,yenliangl/bitcoin,qtumproject/qtum,x-kalux/bitcoin_WiG-B,afk11/bitcoin,afk11/bitcoin,cdecker/bitcoin,jlopp/statoshi,donaloconnor/bitcoin,bespike/litecoin,BitzenyCoreDevelopers/bitzeny,rnicoll/bitcoin,jtimon/bitcoin,achow101/bitcoin,JeremyRubin/bitcoin,bitcoin/bitcoin,globaltoken/globaltoken,droark/bitcoin,FeatherCoin/Feathercoin,Jcing95/iop-hd,mruddy/bitcoin,1185/starwels,yenliangl/bitcoin,untrustbank/litecoin,jonasschnelli/bitcoin,lbryio/lbrycrd,globaltoken/globaltoken,lateminer/bitcoin,RHavar/bitcoin,starwels/starwels,paveljanik/bitcoin,simonmulser/bitcoin,jtimon/bitcoin,ajtowns/bitcoin,MeshCollider/bitcoin,myriadteam/myriadcoin,bitcoin/bitcoin,laudaa/bitcoin,Chancoin-core/CHANCOIN,domob1812/namecore,domob1812/bitcoin,lateminer/bitcoin,x-kalux/bitcoin_WiG-B,tecnovert/particl-core,instagibbs/bitcoin,domob1812/namecore,Theshadow4all/ShadowCoin,trippysalmon/bitcoin,instagibbs/bitcoin,ElementsProject/elements,Anfauglith/iop-hd,dscotese/bitcoin,donaloconnor/bitcoin,namecoin/namecore,ppcoin/ppcoin,midnightmagic/bitcoin,joshrabinowitz/bitcoin,romanornr/viacoin,cryptoprojects/ultimateonlinecash,n1bor/bitcoin,MazaCoin/maza,ppcoin/ppcoin,alecalve/bitcoin,mruddy/bitcoin,EthanHeilman/bitcoin,vmp32k/litecoin,gmaxwell/bitcoin,nikkitan/bitcoin,ryanofsky/bitcoin,21E14/bitcoin,FeatherCoin/Feathercoin,ryanofsky/bitcoin,kevcooper/bitcoin,Friedbaumer/litecoin,tjps/bitcoin,kazcw/bitcoin,sipsorcery/bitcoin,bitbrazilcoin-project/bitbrazilcoin,prusnak/bitcoin,h4x3rotab/BTCGPU,mruddy/bitcoin,thrasher-/litecoin,BitzenyCoreDevelopers/bitzeny,jamesob/bitcoin,qtumproject/qtum,rnicoll/bitcoin,practicalswift/bitcoin,ppcoin/ppcoin,Anfauglith/iop-hd,particl/particl-core,andreaskern/bitcoin,Christewart/bitcoin,DigitalPandacoin/pandacoin,Kogser/bitcoin,nbenoit/bitcoin,droark/bitcoin,namecoin/namecoin-core,mitchellcash/bitcoin,Xekyo/bitcoin,pataquets/namecoin-core,21E14/bitcoin,nikkitan/bitcoin,Anfauglith/iop-hd,sebrandon1/bitcoin,peercoin/peercoin,rnicoll/dogecoin,nikkitan/bitcoin,tjps/bitcoin,mitchellcash/bitcoin,sipsorcery/bitcoin,cryptoprojects/ultimateonlinecash,MeshCollider/bitcoin,Chancoin-core/CHANCOIN,JeremyRubin/bitcoin,paveljanik/bitcoin,apoelstra/bitcoin,nbenoit/bitcoin,ericshawlinux/bitcoin,aspanta/bitcoin,thrasher-/litecoin,namecoin/namecore,jmcorgan/bitcoin,bitcoinsSG/bitcoin,StarbuckBG/BTCGPU,litecoin-project/litecoin,jnewbery/bitcoin,Exgibichi/statusquo,gmaxwell/bitcoin,pstratem/bitcoin,fujicoin/fujicoin,kallewoof/bitcoin,spiritlinxl/BTCGPU,domob1812/bitcoin,mb300sd/bitcoin,ahmedbodi/vertcoin,paveljanik/bitcoin,rnicoll/bitcoin,rnicoll/dogecoin,kevcooper/bitcoin,Xekyo/bitcoin,GroestlCoin/GroestlCoin,simonmulser/bitcoin,Xekyo/bitcoin,apoelstra/bitcoin,domob1812/namecore,apoelstra/bitcoin,Rav3nPL/bitcoin,laudaa/bitcoin,achow101/bitcoin,StarbuckBG/BTCGPU,untrustbank/litecoin,anditto/bitcoin,Theshadow4all/ShadowCoin,bitbrazilcoin-project/bitbrazilcoin,bitbrazilcoin-project/bitbrazilcoin,FeatherCoin/Feathercoin,bespike/litecoin,Theshadow4all/ShadowCoin,GlobalBoost/GlobalBoost,fanquake/bitcoin,mruddy/bitcoin,yenliangl/bitcoin,rnicoll/dogecoin,kallewoof/bitcoin,rawodb/bitcoin,MarcoFalke/bitcoin,yenliangl/bitcoin,mb300sd/bitcoin,stamhe/bitcoin,romanornr/viacoin,Exgibichi/statusquo,Flowdalic/bitcoin,achow101/bitcoin,litecoin-project/litecoin,practicalswift/bitcoin,pataquets/namecoin-core,21E14/bitcoin,h4x3rotab/BTCGPU,h4x3rotab/BTCGPU,wellenreiter01/Feathercoin,jmcorgan/bitcoin,Friedbaumer/litecoin,prusnak/bitcoin,n1bor/bitcoin,Bushstar/UFO-Project,GroestlCoin/bitcoin,cdecker/bitcoin,gjhiggins/vcoincore,OmniLayer/omnicore,mitchellcash/bitcoin,TheBlueMatt/bitcoin,cryptoprojects/ultimateonlinecash,sarielsaz/sarielsaz,apoelstra/bitcoin,UFOCoins/ufo,cryptoprojects/ultimateonlinecash,Kogser/bitcoin,sebrandon1/bitcoin,tjps/bitcoin,mruddy/bitcoin,globaltoken/globaltoken,stamhe/bitcoin,vmp32k/litecoin,Kogser/bitcoin,r8921039/bitcoin,wellenreiter01/Feathercoin,viacoin/viacoin,Flowdalic/bitcoin,bitcoinsSG/bitcoin,vmp32k/litecoin,myriadcoin/myriadcoin,Christewart/bitcoin,aspanta/bitcoin,pstratem/bitcoin,Kogser/bitcoin,CryptArc/bitcoin,jmcorgan/bitcoin,ahmedbodi/vertcoin,Rav3nPL/bitcoin,ahmedbodi/vertcoin,domob1812/bitcoin,vertcoin/vertcoin,Rav3nPL/bitcoin,ahmedbodi/vertcoin,TheBlueMatt/bitcoin,TheBlueMatt/bitcoin,MazaCoin/maza,Gazer022/bitcoin,ryanofsky/bitcoin,Christewart/bitcoin,qtumproject/qtum,peercoin/peercoin,DigitalPandacoin/pandacoin,namecoin/namecoin-core,stamhe/bitcoin,Jcing95/iop-hd,mitchellcash/bitcoin,paveljanik/bitcoin,mb300sd/bitcoin,Christewart/bitcoin,randy-waterhouse/bitcoin,RHavar/bitcoin,bitcoin/bitcoin,sstone/bitcoin,droark/bitcoin,lateminer/bitcoin,jmcorgan/bitcoin,Kogser/bitcoin,digibyte/digibyte,bitbrazilcoin-project/bitbrazilcoin,bitcoin/bitcoin,1185/starwels,starwels/starwels,prusnak/bitcoin,Flowdalic/bitcoin,anditto/bitcoin,afk11/bitcoin,AkioNak/bitcoin,sarielsaz/sarielsaz,GroestlCoin/bitcoin,bespike/litecoin,Jcing95/iop-hd,AkioNak/bitcoin