Skip to content

Yielding Behaviours#27

Draft
marioskogias wants to merge 4 commits into
microsoft:mainfrom
marioskogias:draft-coro
Draft

Yielding Behaviours#27
marioskogias wants to merge 4 commits into
microsoft:mainfrom
marioskogias:draft-coro

Conversation

@marioskogias
Copy link
Copy Markdown
Collaborator

This draft PR enables long running behaviours to yield their execution and let other behaviours run. When a behaviour yields its acquired cowns are not released, thus the causality guarantees are maintained.

A behaviour can yield in two main ways:

  • In the first way, the programmer is in charge of capturing the necessary state inside the acquired cowns. In this case, when the behaviour resumes, it resumes from the beginning and the programmer needs to ensure the correct execution, e.g. by implementing a state machine. An example of this functionality can be seen in the yield.cc test.
  • In the second way, we leverage C++ coroutines to capture the behaviour state. Thus, when the behaviour resumes, it resumes at the exact point it yielded and the compiler is in charge of state capturing.

The goal of this PR is to serve as a conversation starter on whether such a functionality is interesting for verona and not to be merged as is.

This is work done with Musa Unal (umusasadik@gmail.com)

@marioskogias marioskogias requested a review from mjp41 August 23, 2023 13:28
@marioskogias
Copy link
Copy Markdown
Collaborator Author

@m8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants