about summary refs log tree commit diff
path: root/src/libstd/rt/uv/mod.rs
AgeCommit message (Collapse)AuthorLines
2013-10-29Register new snapshotsAlex Crichton-416/+0
2013-10-28Register new snapshotsAlex Crichton-4/+3
2013-10-26Implement another error code found on windows.Alex Crichton-0/+1
Closes #8811
2013-10-24wrapping libuv signal for use in RustDo Nhat Minh-0/+6
descriptive names easier-to-use api reorganize and document
2013-10-24Test fixes and merge conflictsAlex Crichton-0/+7
2013-10-24Move as much I/O as possible off of native::ioAlex Crichton-0/+11
When uv's TTY I/O is used for the stdio streams, the file descriptors are put into a non-blocking mode. This means that other concurrent writes to the same stream can fail with EAGAIN or EWOULDBLOCK. By all I/O to event-loop I/O, we avoid this error. There is one location which cannot move, which is the runtime's dumb_println function. This was implemented to handle the EAGAIN and EWOULDBLOCK errors and simply retry again and again.
2013-10-24Move rt::io::stdio from FileStream to a TTYAlex Crichton-0/+28
We get a little more functionality from libuv for these kinds of streams (things like terminal dimentions), and it also appears to more gracefully handle the stream being a window. Beforehand, if you used stdio and hit CTRL+d on a process, libuv would continually return 0-length successful reads instead of interpreting that the stream was closed. I was hoping to be able to write tests for this, but currently the testing infrastructure doesn't allow tests with a stdin and a stdout, but this has been manually tested! (not that it means much)
2013-10-23Removed Unnecessary comments and white spaces #4386reedlepee-1/+0
2013-10-23Making fields in std and extra : private #4386reedlepee-1/+2
2013-10-05std::rt: Add NotConnected to IoErrorKindklutzy-0/+1
2013-09-30std: Remove usage of fmt!Alex Crichton-2/+2
2013-09-18Implement process bindings to libuvAlex Crichton-2/+10
This is a re-landing of #8645, except that the bindings are *not* being used to power std::run just yet. Instead, this adds the bindings as standalone bindings inside the rt::io::process module. I made one major change from before, having to do with how pipes are created/bound. It's much clearer now when you can read/write to a pipe, as there's an explicit difference (different types) between an unbound and a bound pipe. The process configuration now takes unbound pipes (and consumes ownership of them), and will return corresponding pipe structures back if spawning is successful (otherwise everything is destroyed normally).
2013-09-06Upgrade libuv to the current master (again)Alex Crichton-39/+13
This is a reopening of the libuv-upgrade part of #8645. Hopefully this won't cause random segfaults all over the place. The windows regression in testing should also be fixed (it shouldn't build the whole compiler twice). A notable difference from before is that gyp is now a git submodule instead of always git-cloned at make time. This allows bundling for releases more easily. Closes #8850
2013-09-05std::rt: Add libuv bindings for getaddrinfoBrian Anderson-0/+1
2013-09-05std::rt: Some I/O cleanupBrian Anderson-1/+2
2013-08-29Revert "auto merge of #8645 : alexcrichton/rust/issue-6436-run-non-blocking, ↵Brian Anderson-23/+42
r=brson" This reverts commit b8d1fa399402c71331aefd634d710004e00b73a6, reversing changes made to f22b4b169854c8a4ba86c16ee43327d6bcf94562. Conflicts: mk/rt.mk src/libuv
2013-08-27Implement process bindings to libuvAlex Crichton-6/+12
Closes #6436
2013-08-27Upgrade libuv to the current master + our patchesAlex Crichton-39/+14
There were two main differences with the old libuv and the master version: 1. The uv_last_error function is now gone. The error code returned by each function is the "last error" so now a UvError is just a wrapper around a c_int. 2. The repo no longer includes a makefile, and the build system has change. According to the build directions on joyent/libuv, this now downloads a `gyp` program into the `libuv/build` directory and builds using that. This shouldn't add any dependences on autotools or anything like that. Closes #8407 Closes #6567 Closes #6315
2013-08-22std: bootstrapping libuv-based fileio in newrt... open & closeJeff Olson-5/+17
the test "touch"es a new file
2013-08-19Add externfn macro and correctly label fixed_stack_segmentsNiko Matsakis-0/+4
2013-08-16doc: convert remaining uses of core:: to std::.Huon Wilson-1/+1
2013-08-12Forbid pub/priv where it has no effectAlex Crichton-6/+6
Closes #5495
2013-08-03Rename IpAddr -> SocketAddr, extract IpAddr from SocketAddrStepan Koltsov-2/+2
multicast functions now take IpAddr (without port), because they dont't need port. Uv* types renamed: * UvIpAddr -> UvSocketAddr * UvIpv4 -> UvIpv4SocketAddr * UvIpv6 -> UvIpv6SocketAddr "Socket address" is a common name for (ip-address, port) pair (e.g. in sockaddr_in struct).
2013-08-01A major refactoring that changes the way the runtime uses TLS. In thetoddaaro-2/+3
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-07-25libstd: Fix errors when rtdebug! is not a noop.Luqman Aden-1/+1
2013-07-25libstd: Implement {peer, socket}_name for new rt tcp & udp.Luqman Aden-3/+3
2013-07-08Merge remote-tracking branch 'mozilla/master'Brian Anderson-1/+2
Conflicts: src/libextra/test.rs src/libstd/rt/global_heap.rs src/libstd/unstable/lang.rs src/libstd/vec.rs
2013-07-04Convert vec::{as_imm_buf, as_mut_buf} to methods.Huon Wilson-1/+2
2013-06-25UDP networking with testsEric Reed-4/+2
2013-06-17Merge remote-tracking branch 'upstream/io' into ioEric Reed-27/+10
Conflicts: src/libstd/rt/uvio.rs
2013-06-16Merge remote-tracking branch 'brson/io'Brian Anderson-56/+7
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-14Added a UdpWatcher and UdpSendRequest with associated callbacksEric Reed-3/+12
2013-06-13Remove unused importsSteven Stewart-Gallus-2/+0
I was able to remove unused imports, and fix the following warnings src/libstd/hashmap.rs:23:15: 23:23 warning: unused import [-W unused-imports (default)] src/libstd/task/spawn.rs:95:15: 95:23 warning: unused import [-W unused-imports (default)] src/libstd/rt/uv/mod.rs:42:0: 42:9 warning: unused import [-W unused-imports (default)] src/libstd/rt/uv/mod.rs:45:0: 45:9 warning: unused import [-W unused-imports (default)] src/librustc/middle/trans/meth.rs:26:0: 26:26 warning: unused import [-W unused-imports (default)] src/librustc/back/link.rs:210:20: 210:25 warning: unused import [-W unused-imports (default)] I was unable to fix the following unused import warnings. The code here was weird. src/libextra/std.rc:40:11: 40:14 warning: unused import [-W unused-imports (default)] src/libextra/std.rc:40:16: 40:24 warning: unused import [-W unused-imports (default)]
2013-06-10Replace str::raw::buf_as_slice with c_str_to_static_slice. Close #3843.Ben Blum-15/+1
2013-06-04librustc: Disallow multiple patterns from appearing in a "let" declaration.Patrick Walton-1/+1
You can still initialize multiple variables at once with "let (x, y) = (1, 2)".
2013-06-03rename the Ptr trait to RawPtrDaniel Micay-1/+1
Closes #6607
2013-06-01Remove all uses of `pub impl`. rs=stylePatrick Walton-9/+8
2013-05-29Merge remote-tracking branch 'brson/io' into incomingBrian Anderson-56/+7
Conflicts: src/libstd/rt/sched.rs
2013-05-22libstd: Rename libcore to libstd and libstd to libextra; update makefiles.Patrick Walton-0/+420
This only changes the directory names; it does not change the "real" metadata names.