Avoid deadlock in freeTask (called by forkProcess)
Avoid deadlock in freeTask (called by forkProcess)

Summary: Documented in more detail inline with the change.

Test Plan: validate

Reviewers: austin, simonmar, duncan

Reviewed By: austin, simonmar, duncan

Subscribers: simonmar, relrod, carter

Differential Revision: https://phabricator.haskell.org/D59

vTurbine/ghc,gridaphobe/ghc,holzensp/ghc,wxwxwwxxx/ghc,gridaphobe/ghc,christiaanb/ghc,lukexi/ghc,christiaanb/ghc,frantisekfarka/ghc-dsi,anton-dessiatov/ghc,vikraman/ghc,urbanslug/ghc,siddhanathan/ghc,AlexanderPankiv/ghc,mettekou/ghc,nkaretnikov/ghc,gcampax/ghc,AlexanderPankiv/ghc,vikraman/ghc,spacekitteh/smcghc,ghc-android/ghc,mfine/ghc,nushio3/ghc,mcschroeder/ghc,gridaphobe/ghc,oldmanmike/ghc,olsner/ghc,nushio3/ghc,AlexanderPankiv/ghc,gcampax/ghc,bitemyapp/ghc,forked-upstream-packages-for-ghcjs/ghc,elieux/ghc,mfine/ghc,AlexanderPankiv/ghc,da-x/ghc,nathyong/microghc-ghc,sgillespie/ghc,anton-dessiatov/ghc,ghc-android/ghc,frantisekfarka/ghc-dsi,lukexi/ghc,gcampax/ghc,sgillespie/ghc,forked-upstream-packages-for-ghcjs/ghc,TomMD/ghc,olsner/ghc,AlexanderPankiv/ghc,shlevy/ghc,ml9951/ghc,anton-dessiatov/ghc,siddhanathan/ghc,GaloisInc/halvm-ghc,frantisekfarka/ghc-dsi,tjakway/ghcjvm,christiaanb/ghc,sdiehl/ghc,tjakway/ghcjvm,siddhanathan/ghc,ezyang/ghc,jstolarek/ghc,elieux/ghc,shlevy/ghc,holzensp/ghc,tjakway/ghcjvm,gcampax/ghc,vTurbine/ghc,shlevy/ghc,ezyang/ghc,snoyberg/ghc,ml9951/ghc,mettekou/ghc,sgillespie/ghc,tjakway/ghcjvm,snoyberg/ghc,spacekitteh/smcghc,snoyberg/ghc,nathyong/microghc-ghc,frantisekfarka/ghc-dsi,gridaphobe/ghc,anton-dessiatov/ghc,ghc-android/ghc,acowley/ghc,holzensp/ghc,olsner/ghc,nushio3/ghc,urbanslug/ghc,gridaphobe/ghc,green-haskell/ghc,urbanslug/ghc,gcampax/ghc,GaloisInc/halvm-ghc,ghc-android/ghc,ezyang/ghc,GaloisInc/halvm-ghc,sgillespie/ghc,urbanslug/ghc,nushio3/ghc,mettekou/ghc,GaloisInc/halvm-ghc,fmthoma/ghc,spacekitteh/smcghc,wxwxwwxxx/ghc,mcschroeder/ghc,vTurbine/ghc,acowley/ghc,fmthoma/ghc,fmthoma/ghc,wxwxwwxxx/ghc,GaloisInc/halvm-ghc,nkaretnikov/ghc,AlexanderPankiv/ghc,ml9951/ghc,nathyong/microghc-ghc,gridaphobe/ghc,forked-upstream-packages-for-ghcjs/ghc,mcschroeder/ghc,ml9951/ghc,ml9951/ghc,mettekou/ghc,acowley/ghc,gcampax/ghc,acowley/ghc,ezyang/ghc,vikraman/ghc,holzensp/ghc,mettekou/ghc,vikraman/ghc,da-x/ghc,spacekitteh/smcghc,elieux/ghc,oldmanmike/ghc,oldmanmike/ghc,nkaretnikov/ghc,urbanslug/ghc,forked-upstream-packages-for-ghcjs/ghc,acowley/ghc,christiaanb/ghc,nathyong/microghc-ghc,AlexanderPankiv/ghc,anton-dessiatov/ghc,nushio3/ghc,green-haskell/ghc,siddhanathan/ghc,vTurbine/ghc,frantisekfarka/ghc-dsi,ezyang/ghc,mfine/ghc,GaloisInc/halvm-ghc,snoyberg/ghc,fmthoma/ghc,nathyong/microghc-ghc,nkaretnikov/ghc,vTurbine/ghc,ezyang/ghc,green-haskell/ghc,lukexi/ghc,ml9951/ghc,mfine/ghc,christiaanb/ghc,mfine/ghc,nushio3/ghc,sdiehl/ghc,olsner/ghc,christiaanb/ghc,wxwxwwxxx/ghc,fmthoma/ghc,shlevy/ghc,oldmanmike/ghc,anton-dessiatov/ghc,sdiehl/ghc,tjakway/ghcjvm,shlevy/ghc,acowley/ghc,tjakway/ghcjvm,jstolarek/ghc,TomMD/ghc,urbanslug/ghc,siddhanathan/ghc,mcschroeder/ghc,anton-dessiatov/ghc,nkaretnikov/ghc,vikraman/ghc,sgillespie/ghc,mfine/ghc,ml9951/ghc,siddhanathan/ghc,ml9951/ghc,TomMD/ghc,bitemyapp/ghc,vTurbine/ghc,nushio3/ghc,tjakway/ghcjvm,mcschroeder/ghc,mettekou/ghc,nkaretnikov/ghc,sdiehl/ghc,oldmanmike/ghc,lukexi/ghc,olsner/ghc,lukexi/ghc,ghc-android/ghc,elieux/ghc,spacekitteh/smcghc,sdiehl/ghc,shlevy/ghc,da-x/ghc,fmthoma/ghc,sgillespie/ghc,da-x/ghc,elieux/ghc,TomMD/ghc,TomMD/ghc,green-haskell/ghc,green-haskell/ghc,gcampax/ghc,bitemyapp/ghc,da-x/ghc,mcschroeder/ghc,christiaanb/ghc,shlevy/ghc,acowley/ghc,jstolarek/ghc,snoyberg/ghc,wxwxwwxxx/ghc,GaloisInc/halvm-ghc,gridaphobe/ghc,olsner/ghc,urbanslug/ghc,wxwxwwxxx/ghc,ezyang/ghc,nathyong/microghc-ghc,jstolarek/ghc,vTurbine/ghc,TomMD/ghc,sgillespie/ghc,vikraman/ghc,da-x/ghc,elieux/ghc,bitemyapp/ghc,mfine/ghc,mettekou/ghc,forked-upstream-packages-for-ghcjs/ghc,bitemyapp/ghc,forked-upstream-packages-for-ghcjs/ghc,mcschroeder/ghc,vikraman/ghc,fmthoma/ghc,nkaretnikov/ghc,nathyong/microghc-ghc,wxwxwwxxx/ghc,oldmanmike/ghc,sdiehl/ghc,forked-upstream-packages-for-ghcjs/ghc,sdiehl/ghc,olsner/ghc,ghc-android/ghc,jstolarek/ghc,snoyberg/ghc,TomMD/ghc,ghc-android/ghc,elieux/ghc,siddhanathan/ghc,holzensp/ghc,snoyberg/ghc,da-x/ghc,oldmanmike/ghc