std atomic wait example