<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tmyt</author_name>
  <author_url>https://blog.hatena.ne.jp/tmyt/</author_url>
  <blog_title>tmytのらくがき</blog_title>
  <blog_url>https://blog.tmyt.jp/</blog_url>
  <categories>
    <anon>雑記</anon>
  </categories>
  <description>.NETのSystem.Threading.Tasks空間に、TaskCompletionSource&lt;T&gt;っていうのがあります。 TaskCompletionSource(TResult) クラス (System.Threading.Tasks) これを使うと、こういうコードが書けます。 public Task Sleep(int milliseconds) { var source = new TaskCompletionSource&lt;bool&gt;(); var timer = new Timer(_ =&gt; { source.SetResult(true); }, null, millise…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.tmyt.jp%2Fentry%2F2018%2F06%2F08%2F085513&quot; title=&quot;TaskCompletionSource&amp;lt;T&amp;gt;が覚えられない - tmytのらくがき&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>2018-06-08 08:55:13</published>
  <title>TaskCompletionSource&lt;T&gt;が覚えられない</title>
  <type>rich</type>
  <url>https://blog.tmyt.jp/entry/2018/06/08/085513</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
