Synchronize with the SHA generation threads

Signed-off-by: Gregory Haskins <gregory.haskins@gmail.com>
Set -O3 as the default optimization

Signed-off-by: Gregory Haskins <gregory.haskins@gmail.com>