about summary refs log tree commit diff
path: root/src/libstd/rt/io
AgeCommit message (Collapse)AuthorLines
2013-08-01A major refactoring that changes the way the runtime uses TLS. In thetoddaaro-38/+38
old design the TLS held the scheduler struct, and the scheduler struct held the active task. This posed all sorts of weird problems due to how we wanted to use the contents of TLS. The cleaner approach is to leave the active task in TLS and have the task hold the scheduler. To make this work out the scheduler has to run inside a regular task, and then once that is the case the context switching code is massively simplified, as instead of three possible paths there is only one. The logical flow is also easier to follow, as the scheduler struct acts somewhat like a "token" indicating what is active. These changes also necessitated changing a large number of runtime tests, and rewriting most of the runtime testing helpers. Polish level is "low", as I will very soon start on more scheduler changes that will require wiping the polish off. That being said there should be sufficient comments around anything complex to make this entirely respectable as a standalone commit.
2013-08-01std: Change `Times` trait to use `do` instead of `for`blake2-ppc-4/+4
Change the former repetition:: for 5.times { } to:: do 5.times { } .times() cannot be broken with `break` or `return` anymore; for those cases, use a numerical range loop instead.
2013-08-01make `in` and `foreach` get treated as keywordsDaniel Micay-14/+14
2013-07-26libstd: Tests for {peer, socket}_name.Luqman Aden-0/+86
2013-07-25libstd: Add ToStr impl for IpAddr.Luqman Aden-0/+42
2013-07-25libstd: Get rid of duplication in {peer, socket}_name and remove extra *.Luqman Aden-3/+3
2013-07-25libstd: Implement {peer, socket}_name for new rt tcp & udp.Luqman Aden-3/+48
2013-07-22std: make check appeasementJeff Olson-6/+7
2013-07-22std: minor timer cleanup based on feedbackJeff Olson-5/+5
2013-07-22std: add rt::io::TimerJeff Olson-0/+67
2013-07-19Changed methods on UDP sockets and TCP/UDP watchers to &mut self to reflect ↵Eric Reed-8/+9
that libuv may change the underlying handle.
2013-07-08Merge remote-tracking branch 'upstream/io' into ioEric Reed-5/+8
Conflicts: src/libstd/rt/uvio.rs
2013-07-02IPv6 support for UDP and TCP.Eric Reed-9/+271
2013-06-28librustc: Disallow "mut" from distributing over bindings.Patrick Walton-2/+5
This is the backwards-incompatible part of per-binding-site "mut".
2013-06-28Convert vec::{reserve, reserve_at_least, capacity} to methods.Huon Wilson-1/+1
2013-06-27Convert vec::[mut_]slice to methods, remove vec::const_slice.Huon Wilson-2/+2
2013-06-26converted TCP interface to newtype structsEric Reed-24/+9
2013-06-26removed unecessary methodEric Reed-3/+1
2013-06-25Converted UdpSocket into a newtype struct and (dis)connecting uses move ↵Eric Reed-27/+12
semantics rather than ~.
2013-06-25IPv6 structEric Reed-2/+4
2013-06-25satisfy the formatting checkEric Reed-2/+2
2013-06-25Merge remote-tracking branch 'upstream/io' into ioEric Reed-1/+2
Conflicts: src/rt/rustrt.def.in
2013-06-25UDP networking with testsEric Reed-4/+99
2013-06-23Split out starting a listener from accepting incoming connections.Eric Reed-61/+111
The Listener trait takes two type parameters, the type of connection and the type of Acceptor, and specifies only one method, listen, which consumes the listener and produces an Acceptor. The Acceptor trait takes one type parameter, the type of connection, and defines two methods. The accept() method waits for an incoming connection attempt and returns the result. The incoming() method creates an iterator over incoming connections and is a default method. Example: let listener = TcpListener.bind(addr); // Bind to a socket let acceptor = listener.listen(); // Start the listener for stream in acceptor.incoming() { // Process incoming connections forever (or until you break out of the loop) }
2013-06-19derived instances of Eq and TotalEq for IpAddr rather than implement them ↵Eric Reed-21/+1
manually.
2013-06-19socket based UDP ioEric Reed-24/+77
2013-06-19Wrote the Eq instance of IpAddr in a slightly different way.Eric Reed-3/+3
2013-06-18std::rt: Work around a dynamic borrowck bugBrian Anderson-3/+2
2013-06-17Merge remote-tracking branch 'upstream/io' into ioEric Reed-15/+17
Conflicts: src/libstd/rt/uvio.rs
2013-06-17stated to implement UdpStreamEric Reed-4/+13
2013-06-17added Eq and TotalEq instances for IpAddrEric Reed-0/+21
2013-06-16Merge remote-tracking branch 'brson/io'Brian Anderson-3/+2
Conflicts: src/libstd/rt/comm.rs src/libstd/rt/mod.rs src/libstd/rt/sched.rs src/libstd/rt/task.rs src/libstd/rt/test.rs src/libstd/rt/tube.rs src/libstd/rt/uv/uvio.rs src/libstd/rt/uvio.rs src/libstd/task/spawn.rs
2013-06-15rm vec::uniq_lenDaniel Micay-1/+2
2013-06-13automated whitespace fixesDaniel Micay-1/+0
2013-06-12std: unify the str -> [u8] functions as 3 methods: .as_bytes() and ↵Huon Wilson-2/+2
.as_bytes_with_null[_consume](). The first acts on &str and is not nul-terminated, the last two act on strings that are always null terminated (&'static str, ~str and @str).
2013-06-10std::rt: Work around a dynamic borrowck bugBrian Anderson-3/+2
2013-06-04librustc: Disallow multiple patterns from appearing in a "let" declaration.Patrick Walton-2/+2
You can still initialize multiple variables at once with "let (x, y) = (1, 2)".
2013-06-04std::cell: Modernize constructorsPhilipp Brüschweiler-9/+9
Part of #3853
2013-05-29librustc: Stop reexporting the standard modules from prelude.Patrick Walton-1/+4
2013-05-23cleanup warnings from libstdErick Tryzelaar-4/+2
2013-05-22libstd: Fix merge fallout.Patrick Walton-0/+50
2013-05-22libstd: Rename libcore to libstd and libstd to libextra; update makefiles.Patrick Walton-0/+2700
This only changes the directory names; it does not change the "real" metadata names.