Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New I/O API, scheduler improvements #5960

Merged
merged 9 commits into from
Apr 19, 2013
Merged

New I/O API, scheduler improvements #5960

merged 9 commits into from
Apr 19, 2013

Conversation

brson
Copy link
Contributor

@brson brson commented Apr 19, 2013

r?

This pull request is a grab bag of work on the new scheduler.

The most important commit here is where I outline a fairly complete I/O API, based on Reader and Writer types, as in the current core::io module. I've organized this version into a number of modules with declarations for Files, TCP, UDP, Unix sockets, blocking/non-blocking implementations, memory buffers, compression adapters. I'm trying to get this into shape to present on the mailing list.

This branch also wires up spawn to the new scheduler, and simplifies the core scheduler operations.

…lable

Conflicts:
	src/libcore/rt/sched/mod.rs
It will check which scheduler it is running under and create the
correct type of task as appropriate. Most options aren't supported
but basic spawning works.
`switch_running_tasks_and_then` does a context switch to another
task then immediatly runs a closure.
pub type fd_t = c_int;

// Make this a newtype so we can't do I/O on arbitrary integers
pub struct FileDesc(fd_t);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably this should be FileHandle as discussed yesterday, since on Windows it's HANDLE rather than a descriptor.

bors added a commit that referenced this pull request Apr 19, 2013
r?

This pull request is a grab bag of work on the new scheduler.

The most important commit here is where I [outline](https://github.com/brson/rust/blob/io/src/libcore/rt/io/mod.rs) a fairly complete I/O API, based on `Reader` and `Writer` types, as in the current `core::io` module. I've organized this version into a number of modules with declarations for Files, TCP, UDP, Unix sockets, blocking/non-blocking implementations, memory buffers, compression adapters. I'm trying to get this into shape to present on the mailing list.

This branch also wires up `spawn` to the new scheduler, and simplifies the core scheduler operations.
@bors bors closed this Apr 19, 2013
@bors bors merged commit 7270fad into rust-lang:incoming Apr 19, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Aug 28, 2020
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.

3 participants