-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…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); |
There was a problem hiding this comment.
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.
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Aug 28, 2020
Rustup r? @ghost changelog: none
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
andWriter
types, as in the currentcore::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.