Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Coroutine set #3

Open
Open
@wiluite

Description

@wiluite

Thanks for the coroutine set.

The evolution of samples from the first one(02.10) to the result is awesome and produces the expected results.
However, what if one would use it from the perspective to write something more generic:

For example the data for "sending coroutine" could be just:

    std::vector<byte> fakeBytes {'H'_B,'e'_B,'l'_B,'l'_B,'o'_B    };

and the code in "parsing coroutine" is co-awaiting and just co-yielding (echoing):

while (true) {        byte b =co_await byte{};        std::string frame{};        frame.push_back(static_cast<char>(b));co_yield frame;    }

And in this sense the modified (02.10) keeps working as expected, but already the next one doesn't (is crashed).
Of course, things were done with an eye to a specific version of the protocol, the outcomes in common seem not functionally equivalent. And I thought that the issues could be interesting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp