about summary refs log tree commit diff
path: root/src/libstd/rt/uv
AgeCommit message (Collapse)AuthorLines
2013-08-20auto merge of #8566 : toddaaro/rust/idle-opt+cleaning, r=catamorphism,brsonbors-7/+96
Instead of a furious storm of idle callbacks we just have one. This is a major performance gain - around 40% on my machine for the ping pong bench. Also in this PR is a cleanup commit for the scheduler code. Was previously up as a separate PR, but bors load + imminent merge hell led me to roll them together. Was #8549.
2013-08-19clean whitespace :/toddaaro-3/+3
2013-08-19Add externfn macro and correctly label fixed_stack_segmentsNiko Matsakis-0/+168
2013-08-18auto merge of #8551 : huonw/rust/speling, r=alexcrichtonbors-2/+2
(This doesn't add/remove `u`s or change `ize` to `ise`, or anything like that.)
2013-08-16Moved the logic for a pausible idle callback into a new type - ↵toddaaro-18/+72
PausibleIdleCallback and placed the appropriate signatures in rtio and implementation into uvio.
2013-08-16std::rt: Fix a race in UvRemoteCallback's dtor that misses callbacksBrian Anderson-7/+28
Full description in comments.
2013-08-16an attempt at a singleton pausible idle callback for each scheduler. suffers ↵toddaaro-0/+14
from nondeterministic deadlock and also pending scheduler messages on scheduler shutdown.
2013-08-16doc: convert remaining uses of core:: to std::.Huon Wilson-1/+1
2013-08-16doc: correct spelling in documentation.Huon Wilson-1/+1
2013-08-15Add ToCStr method .with_c_str()Kevin Ballard-4/+4
.with_c_str() is a replacement for the old .as_c_str(), to avoid unnecessary boilerplate. Replace all usages of .to_c_str().with_ref() with .with_c_str().
2013-08-12Forbid pub/priv where it has no effectAlex Crichton-6/+6
Closes #5495
2013-08-09auto merge of #8296 : erickt/rust/remove-str-trailing-nulls, r=ericktbors-15/+16
This PR fixes #7235 and #3371, which removes trailing nulls from `str` types. Instead, it replaces the creation of c strings with a new type, `std::c_str::CString`, which wraps a malloced byte array, and respects: * No interior nulls * Ends with a trailing null
2013-08-09Merge remote-tracking branch 'remotes/origin/master' into ↵Erick Tryzelaar-70/+2
remove-str-trailing-nulls
2013-08-09Remove the C++ runtime. SayonaraBrian Anderson-9/+0
2013-08-06Merge remote-tracking branch 'remotes/origin/master' into ↵Erick Tryzelaar-4/+4
remove-str-trailing-nulls
2013-08-06Use FromStr for IpAddr in rt::uv::netStepan Koltsov-70/+2
2013-08-05Updated std::Option, std::Either and std::ResultMarvin Löbel-4/+4
- Made naming schemes consistent between Option, Result and Either - Changed Options Add implementation to work like the maybe monad (return None if any of the inputs is None) - Removed duplicate Option::get and renamed all related functions to use the term `unwrap` instead
2013-08-04Merge remote-tracking branch 'remotes/origin/master' into str-remove-nullErick Tryzelaar-107/+85
2013-08-04std: replace str::as_c_str with std::c_strErick Tryzelaar-15/+16
2013-08-04auto merge of #8243 : stepancheg/rust/ipv, r=brsonbors-98/+76
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). P. S. Are there any backward compatibility concerns? What is std::rt module, is it a part of public API?
2013-08-03remove obsolete `foreach` keywordDaniel Micay-9/+9
this has been replaced by `for`
2013-08-03Rename IpAddr -> SocketAddr, extract IpAddr from SocketAddrStepan Koltsov-98/+76
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-02replace `range` with an external iteratorDaniel Micay-6/+6
2013-08-01fixed incorrect handling of returned scheduler option and restructed ↵toddaaro-1/+1
scheduler functions slightly
2013-08-01minor tweaks - unboxed the coroutine so that it is no longer a ~ pointer ↵toddaaro-3/+1
inside the task struct, and also added an assert to verify that send is never called inside scheduler context as it is undefined (BROKEN) if that happens
2013-08-01A major refactoring that changes the way the runtime uses TLS. In thetoddaaro-26/+19
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-01migrate many `for` loops to `foreach`Daniel Micay-4/+5
2013-07-30std::rt: Change Thread interface to require an explicit joinBrian Anderson-6/+12
Makes it more obvious what's going on
2013-07-27Change concurrency primitives to standard naming conventionsSteven Stewart-Gallus-2/+2
To be more specific: `UPPERCASETYPE` was changed to `UppercaseType` `type_new` was changed to `Type::new` `type_function(value)` was changed to `value.method()`
2013-07-25libstd: Implement some missing udp methods.Luqman Aden-13/+124
2013-07-25libstd: Implement some missing tcp methods.Luqman Aden-9/+66
2013-07-25libstd: Get rid of duplication in {peer, socket}_name and remove extra *.Luqman Aden-100/+46
2013-07-25libstd: Handle IPv4-Mapped/Compatible IPv6 addresses.Luqman Aden-1/+30
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-64/+152
2013-07-23std: move StrUtil::as_c_str into StrSliceErick Tryzelaar-2/+2
2013-07-22std: fix for blocked task resumeJeff Olson-2/+2
2013-07-22std: add RtioTimer and UvTimer impl atop rt::uvJeff Olson-0/+63
2013-07-20auto merge of #7908 : anasazi/rust/fix_udp_mut, r=brsonbors-54/+52
2013-07-20Change the HOF context switchers to pass a BlockedTask instead of a ~Task.Ben Blum-12/+12
2013-07-19Missed the methods of UdpWatcher.Eric Reed-18/+16
2013-07-19Changed methods on UDP sockets and TCP/UDP watchers to &mut self to reflect ↵Eric Reed-36/+36
that libuv may change the underlying handle.
2013-07-17test: Fix tests.Patrick Walton-3/+3
2013-07-17test: Fix tests.Patrick Walton-1/+1
2013-07-16Rename Option swap_unwrap to take_unwrap. Fixes Issue#7764Austin King-8/+8
2013-07-09std::rt: Ignore 0-byte udp readsBrian Anderson-0/+7
2013-07-09std::rt: size_t, not u64Brian Anderson-2/+2
2013-07-08TidyBrian Anderson-5/+9
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-08changed .each() to .iter().advance()Eric Reed-10/+10