Skip to content

Instantly share code, notes, and snippets.

@potix2
Created December 29, 2012 15:27
Show Gist options
  • Save potix2/4407555 to your computer and use it in GitHub Desktop.
Save potix2/4407555 to your computer and use it in GitHub Desktop.
非同期処理の完了を待つ
//継続的デリバリー p.265から
private void ConfirmEmailWasReceived() {
TimeStamp testStart = TimeStamp.NOW;
do {
if (EmailFound()) {
return;
}
Wait(SMALL_PAUSE);
} while(TimeStamp.NOW < testStart + DELAY_PRRIOD);
Fail("時間内にメールを受け取れなかった");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment