fix a race condition in examples.diskperf.
Merge pull request #1240 from STEllAR-GROUP/fix_diskperf

fix a race condition in examples.diskperf.