about summary refs log tree commit diff
path: root/src/libstd/rt/test.rs
AgeCommit message (Collapse)AuthorLines
2013-08-19Try to fix mac valgrind bot by disabling thread-heavy activities.Graydon Hoare-5/+9
2013-08-19Add externfn macro and correctly label fixed_stack_segmentsNiko Matsakis-0/+3
2013-08-10Mass rename of .consume{,_iter}() to .move_iter()Erick Tryzelaar-1/+1
cc #7887
2013-08-08Enabled workstealing in the scheduler. Previously we had one global work ↵toddaaro-4/+14
queue shared by each scheduler. Now there is a separate work queue for each scheduler, and work is "stolen" from other queues when it is exhausted locally.
2013-08-07std: Allow spawners to specify stack sizeBrian Anderson-8/+7
2013-08-05Updated std::Option, std::Either and std::ResultMarvin Löbel-2/+2
- 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-04auto merge of #8243 : stepancheg/rust/ipv, r=brsonbors-5/+5
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-4/+4
this has been replaced by `for`
2013-08-02Bump fd limit on macos when running rt testsKevin Ballard-0/+78
OS X defaults the ulimit for open files to 256 for programs launched from the Terminal (GUI apps get a higher default). Unfortunately this is too low for the rt tests, which deliberately overcommit and create a lot of threads (which means a lot of schedulers, and each scheduler needs at least 2 fds). By calling sysctl() and setrlimit() we can bump the fd limit up to the maximum allowed (on stock OS X it's 10240). Fixes #7772.
2013-08-02Revert "std::rt: Use a constant 4 threads for multithreaded sched tests"Kevin Ballard-4/+5
This workaround was less than ideal. A better solution is to raise the fd limit. This reverts commit 49b72bdd77916e27aaf95909516702c1450f11ac.
2013-08-03Rename IpAddr -> SocketAddr, extract IpAddr from SocketAddrStepan Koltsov-5/+5
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-2/+2
2013-08-01fixed incorrect handling of returned scheduler option and restructed ↵toddaaro-1/+3
scheduler functions slightly
2013-08-01A major refactoring that changes the way the runtime uses TLS. In thetoddaaro-168/+53
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/+4
2013-07-30std::rt: Change Thread interface to require an explicit joinBrian Anderson-1/+3
Makes it more obvious what's going on
2013-07-25libstd: Fix errors when rtdebug! is not a noop.Luqman Aden-2/+2
2013-07-20auto merge of #7858 : bblum/rust/kill, r=brsonbors-7/+17
Some notes about the commits. Exit code propagation commits: * ```Reimplement unwrap()``` has the same old code from ```arc::unwrap``` ported to use modern atomic types and finally (it's considerably nicer this way) * ```Add try_unwrap()``` has some new slightly-tricky (but pretty simple) concurrency primitive code * ```Add KillHandle``` and ```Add kill::Death``` are the bulk of the logic. Task killing commits: * ```Implement KillHandle::kill() and friends```, ```Do a task-killed check```, and ```Add BlockedTask``` implement the killing logic; * ```Change the HOF context switchers``` turns said logic on Linked failure commits: * ```Replace *rust_task ptrs``` adapts the taskgroup code to work for both runtimes * ```Enable taskgroup code``` does what it says on the tin. r? @brson
2013-07-20Add test::with_test_task() convenience function.Ben Blum-1/+11
2013-07-20Change the HOF context switchers to pass a BlockedTask instead of a ~Task.Ben Blum-3/+3
2013-07-20Add kill::Death for task death services and use it in Task.Ben Blum-3/+3
2013-07-20auto merge of #7855 : brson/rust/rt-overcommit, r=pcwaltonbors-5/+4
Too much overcommit here exhausts the low fd limit on OS X.
2013-07-19std::rt: Use a constant 4 threads for multithreaded sched tests. #7772Brian Anderson-5/+4
Too much overcommit here exhausts the low fd limit on OS X.
2013-07-17std::rt: Rename RUST_TEST_THREADS to RUST_RT_TEST_THREADSBrian Anderson-1/+1
2013-07-08Merge remote-tracking branch 'anasazi/io'Brian Anderson-3/+12
Conflicts: src/libstd/rt/test.rs
2013-07-08std::rt: Add a hack to allocate different test port ranges to different botsBrian Anderson-2/+44
2013-07-02Merge remote-tracking branch 'upstream/io' into ioEric Reed-174/+97
Conflicts: src/libstd/rt/test.rs src/rt/rustrt.def.in
2013-07-02IPv6 support for UDP and TCP.Eric Reed-2/+7
2013-07-01Refactored the runtime to view coroutines as a component of tasks, instead ↵toddaaro-179/+98
of tasks as a component of coroutines.
2013-06-24std::rt: deny(unused_unsafe)Brian Anderson-1/+1
2013-06-17std::rt: Add util mod and num_cpus functionBrian Anderson-5/+2
2013-06-16Merge remote-tracking branch 'brson/io'Brian Anderson-63/+296
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-15Merge remote-tracking branch 'brson/io-wip' into ioBrian Anderson-44/+54
Conflicts: src/libstd/rt/sched.rs src/libstd/rt/task.rs src/libstd/rt/test.rs src/libstd/task/mod.rs src/libstd/task/spawn.rs
2013-06-15std::rt: Tasks contain a JoinLatchBrian Anderson-31/+24
2013-06-14redesigned the pinning to pin deal with things on dequeue, not on enqueuetoddaaro-14/+18
2013-06-13std::rt: Tasks must have an unwinder. SimplerBrian Anderson-6/+6
2013-06-13std::rt: Change the Task constructors to reflect a treeBrian Anderson-10/+36
2013-06-13automated whitespace fixesDaniel Micay-1/+0
2013-06-12added functionality to tell schedulers to refuse to run tasks that are not ↵toddaaro-5/+25
pinned to them
2013-06-12A basic implementation of pinning tasks to schedulers. No IO interactions ↵toddaaro-0/+124
have been planned for, and no forwarding of tasks off special schedulers is supported.
2013-06-06std::rt: Configure test threads with RUST_TEST_THREADS. Default is ncores x2Brian Anderson-2/+17
2013-06-04std::cell: Modernize constructorsPhilipp Brüschweiler-8/+8
Part of #3853
2013-05-30core::rt: deny(unused_imports, unused_mut, unused_variable)Brian Anderson-5/+3
2013-05-30core::rt: Fix two multithreading bugs and add a threadring testBrian Anderson-1/+1
This properly distributes the load now
2013-05-29Merge remote-tracking branch 'brson/io' into incomingBrian Anderson-26/+89
Conflicts: src/libstd/rt/sched.rs
2013-05-22libstd: Rename libcore to libstd and libstd to libextra; update makefiles.Patrick Walton-0/+192
This only changes the directory names; it does not change the "real" metadata names.