Skip to content

coro: redesign #104

@Cloudef

Description

@Cloudef

I don't like the current coro api, it's too high level and the scheduler is not a good abstraction.

Ideally coro example should look something like this:

while (!client.completed or !server.completed) {
    _ = client.schedule(&io); // returns either .yielded or .complete
    _ = server.schedule(&io);
    io.schedule(null); // null == optional timeout
}

This makes application completely in control of the scheduling, and the task / frame needs less state internally. The fundamentals should be flexible and solid enough to open doors for higher level abstractions.

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