Skip to content

Commit

Permalink
More work to split sync/async in ImapFolderFetch.cs
Browse files Browse the repository at this point in the history
Part of an ongoing effort to fix issue #1335
  • Loading branch information
jstedfast committed Dec 28, 2023
1 parent 092a006 commit 1a191ad
Show file tree
Hide file tree
Showing 4 changed files with 469 additions and 114 deletions.
20 changes: 0 additions & 20 deletions MailKit/Net/Imap/ImapEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -919,26 +919,6 @@ internal ValueTask<ImapToken> ReadTokenAsync (bool doAsync, CancellationToken ca
return new ValueTask<ImapToken> (token);
}

internal ValueTask<ImapToken> PeekTokenAsync (string specials, bool doAsync, CancellationToken cancellationToken)
{
if (doAsync)
return PeekTokenAsync (specials, cancellationToken);

var token = PeekToken (specials, cancellationToken);

return new ValueTask<ImapToken> (token);
}

internal ValueTask<ImapToken> PeekTokenAsync (bool doAsync, CancellationToken cancellationToken)
{
if (doAsync)
return PeekTokenAsync (cancellationToken);

var token = PeekToken (cancellationToken);

return new ValueTask<ImapToken> (token);
}

/// <summary>
/// Reads the next token.
/// </summary>
Expand Down
Loading

0 comments on commit 1a191ad

Please sign in to comment.