Skip to content

Playground timeout on listing 17-13 #4689

@DanielEScherzer

Description

@DanielEScherzer

URL to the section(s) of the book with this problem:
https://doc.rust-lang.org/1.94.0/book/ch17-02-concurrency-with-async.html#listing-17-13

Description of the problem:
The example code explicitly includes 4 trpl::sleep(Duration::from_millis(1500)).await; calls, meaning that the program will take at least 4*1500=6000 ms to execute. However, after 6000 ms the default javascript timeout is exhausted, leading to Playground Communication: timeout

Suggested fix:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions