<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>xin9le</author_name>
  <author_url>https://blog.hatena.ne.jp/xin9le/</author_url>
  <blog_title>xin9le.net</blog_title>
  <blog_url>https://xin9le.hatenablog.jp/</blog_url>
  <categories>
    <anon>Async</anon>
  </categories>
  <description>前回はawaitするためのコンパイラ要件について確認しました。コンパイラは独自型をawaitするための汎用性を残した展開を行います。ここでは実際にAwaitableな型を自前実装してみます。 Awaitableパターンの実装 Awaitable型 まずawait演算子に渡すAwaitable型を作成します。ここでは、外部からデリゲートとして与えられたタスクの非同期実行や、そのタスクが完了しているかどうかの取得、完了時にコールバックしてほしい処理の登録などを実装します。以下にそのサンプルを示します。 using System; using System.Collections.Generic; …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fxin9le.hatenablog.jp%2Fentry%2F2012%2F11%2F05%2F203504&quot; title=&quot;非同期メソッド入門 (9) - Awaitableパターンの自前実装 - xin9le.net&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2012-11-05 20:35:04</published>
  <title>非同期メソッド入門 (9) - Awaitableパターンの自前実装</title>
  <type>rich</type>
  <url>https://xin9le.hatenablog.jp/entry/2012/11/05/203504</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
