Skip to content

Rewiring serializes task runs? #399

Answered by pdeligia
jhwj9617 asked this question in Q&A
Discussion options

You must be logged in to vote

@jhwj9617 this is not a bug, but a feature: to tame state-space explosion, coyote does not explore an interleaving at every single instruction; instead, it explores interleavings in what we call "scheduling points". The most common scheduling points are calls to concurrent task APIs (e.g. Task.Run, Task.Wait, Task.WhenAll, Task.Delay(...), etc), or calls to await, interleavings around lock (and others). We have been adding more over time -- we do not currently have a list of all these in the docs (its a TODO).

If you try the following it should do what you expected:

            var tasks = new List<Task>()
            {
                Task.Run(async () =>
                {
              …

Replies: 9 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by pdeligia
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #334 on October 17, 2022 17:01.