1
Vote

WorkItem.runningTasks is constantly growing on Windows Phone

description

The WorkItem class has the property runningTasks which is of type:
Hashtable<Thread, Stack<Task>>
 
Thread.CurrentThread is used as the key for this hashtable. In my tests on the Windows Phone Thread.CurrentThread can return different Thread instances for the same thread! This causes the runningTasks hashtable to grow constantly.
 
To fix this simply use Thread.CurrentThread.ManagedThreadId as the key in the hashtable and not the Thread object itself.
 
Please note that I use a slightly modified version of your ParallelTasks library but I think the bug and the fix apply to the original code as well.

comments

coach008 wrote Jul 22, 2015 at 10:07 AM

http://www.nikerosherunwomen.net
http://www.rosherunwomen.org
http://www.nikerosherunflyknit.com
http://www.rosherunflyknit.net
http://www.nikerosherunblack.net
http://www.rosherunblack.net
http://www.nikerosherunmens.com
http://www.rosherunmen.org
http://www.nikeairhuarache.net
http://www.nikehuaracheblack.com
http://www.nikehuarachewhite.com
http://www.nikehuarachewomens.com
http://www.nike-freerun50.com
http://www.nikefree40flyknit.net
http://www.nikefree30flyknit.net
http://www.nikefreetrainer50.net
http://www.2015coachfactoryoutlet.com
http://www.2015coachoutlet.com
http://www.2015coachbags.net
http://www.coachoutlet-factorystore.org
http://www.coachoutletstoreny.com
http://www.coachbagssaleuk.com
http://www.coachfactoryusa.net
http://www.coachcouponcode.org
http://www.coach80off.com
http://www.coachoutletpromocode.com
http://www.2015coachpurses.com
http://www.coachbagsoutletfactory.net
http://www.coach-outletcoupons.com
http://www.coachbags-onsale.net
http://www.coachoutletnj.net
http://www.coachoutletstoreinc.org
http://www.michaelkorsjetset.org
http://www.mkmichaelkorsuk.com
http://www.michaelkorsmkoutlet.org
http://www.michaelkorsmkbags.net
http://www.mkmichaelkorsfactoryoutlet.com
http://www.mkfactoryoutlet.net
http://www.mkmichaelkorspurses.com
http://www.mkmichaelkorsbags.net
http://www.mkmichaelkorshandbags.net
http://www.michaelkorsmksale.com
http://www.mk-outletonline.org
http://www.michaelkors-mk.org
http://www.michaelkorsmkwallet.com
http://www.michaelkorsoutletonlinee.net
http://www.2015michaelkorsoutlet.net
http://www.2015michaelkorsbags.net
http://www.katespadeoutlet2015.net
http://www.katespadeukoutlet.com
http://www.katespadesaleuk.com
http://www.katespadebagsus.com
http://www.katespade2015.org
http://www.katespadepursesus.org
http://www.katespade-usa.org
http://www.katespadecheap.net
http://www.katespadetotebags.com
http://www.katespade-newyork.net
http://www.katespade-outletonline.net
http://www.katespadefactory.org
http://www.katespadesurprisesale.com
http://www.katespadecrossbody.com
http://www.katespadehandbags-outlet.net
http://www.katespade-diaperbag.net
http://www.louisvuitton-lvoutlet.net
http://www.louisvuittonoutlet--2014.com
http://www.louisvuitton--outletstore.net
http://www.louisvuitton-lv.us.com
http://www.louisvuitton-sunglassess.com
http://www.usalouisvuittonoutlet-stores.com
http://www.cheaplouisvuittonbagso.com
http://www.louisvuittonstore2015.com
http://www.louisvuittonnew-lv.com
http://www.usalouisvuittonoutlet-store.com
http://www.louisvuittonsunglassess.net
http://www.cheaplouisvuitton-bagso.net
http://www.louisvuittonstore2013.com
http://www.louisvuitton-newlv.com
http://www.louisvuitton-bags-2015.com
http://www.louisvuitton-lvpurses.com
http://www.cheaplvbags-top.net
http://www.nikeoutlet-hot.com
http://www.nikeoutletstore-online.com
http://www.nikeairmax90classic.com
http://www.nikeairmaxshoes-store.com
http://www.nikeairmax90shoes.com
http://www.nikeairmaxtheapremium.com
http://www.cheapnikeairmaxltd.com
http://www.nikeairmax1essential.com
http://www.nikeairmax1in2014.com
http://www.cheap-airjordanshoesforsale.com
http://www.nikeairjordanshoes-store.com
http://www.airjordan5forsale.com
http://www.airjordan4cement.com
http://www.airjordan11releasedate.com
http://www.louisvuittonclutchs.com
http://www.louisvuitton-plazabags.com
http://www.louisvuittonoutletyears.com
http://www.louisvuitton-christmas.com