fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

9.8K
active users

#ValueTask

0 posts0 participants0 posts today
Habr<p>Как и зачем использовать ValueTask в C#</p><p>Привет, Хабр! Сегодня мы будем разбирать интересную вещь в C# ValueTask — штука, которая спасет асинхронные методы от лишних аллокаций. Если коротко, ValueTask — это структура, которая позволяет вернуть либо Task , либо готовый результат. Она появилась в C# 7.0 для снижения накладных расходов при работе с асинхронным кодом.</p><p><a href="https://habr.com/ru/companies/otus/articles/873128/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">habr.com/ru/companies/otus/art</span><span class="invisible">icles/873128/</span></a></p><p><a href="https://zhub.link/tags/c" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>c</span></a># <a href="https://zhub.link/tags/%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BC%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>программирование</span></a> <a href="https://zhub.link/tags/valuetask" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>valuetask</span></a> <a href="https://zhub.link/tags/%D0%B0%D1%81%D0%B8%D0%BD%D1%85%D1%80%D0%BE%D0%BD%D0%BD%D1%8B%D0%B5_%D0%BC%D0%B5%D1%82%D0%BE%D0%B4%D1%8B" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>асинхронные_методы</span></a></p>
xUnit.net<p>There was a question about why some assertion features (related to ValueTask and Span) weren&#39;t available in v2, even though they&#39;re in the source code: <a href="https://github.com/xunit/xunit/issues/2648" target="_blank" rel="nofollow noopener noreferrer" translate="no"><span class="invisible">https://</span><span class="ellipsis">github.com/xunit/xunit/issues/</span><span class="invisible">2648</span></a></p><p>The answer at <a href="https://github.com/xunit/xunit/issues/2648#issuecomment-1385316755" target="_blank" rel="nofollow noopener noreferrer" translate="no"><span class="invisible">https://</span><span class="ellipsis">github.com/xunit/xunit/issues/</span><span class="invisible">2648#issuecomment-1385316755</span></a> explains why, but more importantly, we updated the samples project to show how you can get access to ValueTask and Span assertion library features in v2 by using our assertion library via source instead of binary.</p><p><a href="https://fosstodon.org/tags/CSharp" class="mention hashtag" rel="tag">#<span>CSharp</span></a> <a href="https://fosstodon.org/tags/DotNet" class="mention hashtag" rel="tag">#<span>DotNet</span></a> <a href="https://fosstodon.org/tags/ValueTask" class="mention hashtag" rel="tag">#<span>ValueTask</span></a> <a href="https://fosstodon.org/tags/Span" class="mention hashtag" rel="tag">#<span>Span</span></a> <a href="https://fosstodon.org/tags/UnitTesting" class="mention hashtag" rel="tag">#<span>UnitTesting</span></a> <a href="https://fosstodon.org/tags/TDD" class="mention hashtag" rel="tag">#<span>TDD</span></a></p>