The most effective way that I've found is to push your boner to the side, if that makes sense. The problem with this is that you gotta hide the act of pushing your boner to the side.
What's a better way? Don't you dare say folding your arms...
-
As a wearer of basketball shorts and warm ups, I discovered the method of shoving my wood up vertically (when discreet action is possible), leaving the elastic of my pants to hold it against my stomach. Obviously the issue with this is that your wood is gonna show if you shirt gets lifted up for any reason, so use VERY carefully... but it has the dual effect of hiding the wood and making it go away faster. Also lean forward and use whatever objects you have in hand to obscure.