about summary refs log tree commit diff
path: root/src/libstd/rt/io/timer.rs
AgeCommit message (Collapse)AuthorLines
2013-11-11Move std::rt::io to std::ioAlex Crichton-186/+0
2013-11-11Clean lint on test buildCorey Richardson-2/+0
2013-11-10Fix usage of libuv for windowsAlex Crichton-6/+2
2013-11-10Another round of test fixes from previous commitsAlex Crichton-5/+1
2013-11-03Remove all blocking std::os blocking functionsAlex Crichton-0/+1
This commit moves all thread-blocking I/O functions from the std::os module. Their replacements can be found in either std::rt::io::file or in a hidden "old_os" module inside of native::file. I didn't want to outright delete these functions because they have a lot of special casing learned over time for each OS/platform, and I imagine that these will someday get integrated into a blocking implementation of IoFactory. For now, they're moved to a private module to prevent bitrot and still have tests to ensure that they work. I've also expanded the extensions to a few more methods defined on Path, most of which were previously defined in std::os but now have non-thread-blocking implementations as part of using the current IoFactory. The api of io::file is in flux, but I plan on changing it in the next commit as well. Closes #10057
2013-10-25Enhance timers to create portsAlex Crichton-4/+131
In addition to being able to sleep the current task, timers should be able to create ports which get notified after a period of time. Closes #10014
2013-10-24Remove IoFactoryObject for ~IoFactoryAlex Crichton-15/+13
This involved changing a fair amount of code, rooted in how we access the local IoFactory instance. I added a helper method to the rtio module to access the optional local IoFactory. This is different than before in which it was assumed that a local IoFactory was *always* present. Now, a separate io_error is raised when an IoFactory is not present, yet I/O is requested.
2013-10-24Migrate Rtio objects to true trait objectsAlex Crichton-3/+2
This moves as many as I could over to ~Trait instead of ~Typedef. The only remaining one is the IoFactoryObject which should be coming soon...
2013-10-09option: rewrite the API to use compositionDaniel Micay-1/+1
2013-10-02Stop using newtype wrappers in std::rt::ioSteven Fackler-3/+5
UnboundedPipeStream is still a newtype since process::set_stdio needs to look into its internals. Closes #9667
2013-09-30std: Remove usage of fmt!Alex Crichton-1/+1
2013-09-15std::rt: Add a standalone sleep function.Huon Wilson-0/+14
2013-09-06Make I/O tests use run_in_mt_newsched_task to get more multi-threaded test ↵Eric Reed-1/+1
coverage
2013-08-27librustc: Ensure that type parameters are in the right positions in paths.Patrick Walton-1/+1
This removes the stacking of type parameters that occurs when invoking trait methods, and fixes all places in the standard library that were relying on it. It is somewhat awkward in places; I think we'll probably want something like the `Foo::<for T>::new()` syntax.
2013-08-20Moved .sleep() to Timer.Eric Reed-7/+2
2013-08-19Make IO thread-safe.Eric Reed-7/+3
Each IO handle has a home event loop, which created it. When a task wants to use an IO handle, it must first make sure it is on that home event loop. It uses the scheduler handle in the IO handle to send itself there before starting the IO action. Once the IO action completes, the task restores its previous home state. If it is an AnySched task, then it will be executed on the new scheduler. If it has a normal home, then it will return there before executing any more code after the IO action.
2013-07-22std: make check appeasementJeff Olson-6/+7
2013-07-22std: minor timer cleanup based on feedbackJeff Olson-4/+4
2013-07-22std: add rt::io::TimerJeff Olson-0/+63