Add a cast to quiet the compiler warning.
Merge pull request #1239 from STEllAR-GROUP/fix_diskperf

fix wait_each in examples.diskperf
fix a race condition in examples.diskperf.