rust/src/rt
bors 0bc1ca4045 auto merge of #8631 : anasazi/rust/homing-io, r=brson
libuv handles are tied to the event loop that created them. In order to perform IO, the handle must be on the thread with its home event loop. Thus, when as task wants to do IO it must first go to the IO handle's home event loop and pin itself to the corresponding scheduler while the IO action is in flight. Once the IO action completes, the task is unpinned and either returns to its home scheduler if it is a pinned task, or otherwise stays on the current scheduler.

Making new blocking IO implementations (i.e. files) thread safe is rather simple. Add a home field to the IO handle's struct in uvio and implement the HomingIO trait. Wrap every IO call in the HomingIO.home_for_io method, which will take care of the scheduling.

I'm not sure if this remains thread safe in the presence of asynchronous IO at the libuv level. If we decide to do that, then this set up should be revisited.
2013-08-20 17:12:09 -07:00
..
arch Add support for vanilla linux on arm. 2013-08-04 19:28:06 -04:00
isaac
jemalloc jemalloc: use $(AR), not ar 2013-08-19 20:53:02 -04:00
linenoise
msvc
sync
util
vg
boxed_region.cpp rt: Remove rust_env 2013-08-16 13:24:24 -07:00
boxed_region.h
memory_region.cpp rt: Print alloc backtraces for bad release_alloc with RUSTRT_TRACK_ALLOCATIONS 2013-07-17 14:04:03 -07:00
memory_region.h rt: Print alloc backtraces for bad release_alloc with RUSTRT_TRACK_ALLOCATIONS 2013-07-17 14:04:03 -07:00
miniz.cpp
rust_abi.cpp
rust_abi.h
rust_android_dummy.cpp rt: add android dummy functions for mman related 2013-06-26 10:25:12 +09:00
rust_android_dummy.h
rust_builtin.cpp rt: Remove rust_stack 2013-08-16 13:24:25 -07:00
rust_crate_map.cpp
rust_crate_map.h Remove the C++ runtime. Sayonara 2013-08-09 16:45:50 -07:00
rust_exchange_alloc.cpp simplify the exchange allocator 2013-06-30 03:45:36 -04:00
rust_exchange_alloc.h simplify the exchange allocator 2013-06-30 03:45:36 -04:00
rust_gc_metadata.cpp std::rt: Update GC metadata in init 2013-06-19 16:08:07 -07:00
rust_gc_metadata.h
rust_globals.h rt: Remove unused parts of rust_globals.h 2013-08-16 13:24:24 -07:00
rust_gpr_base.h
rust_log.cpp auto merge of #8551 : huonw/rust/speling, r=alexcrichton 2013-08-18 05:11:58 -07:00
rust_rng.cpp
rust_rng.h
rust_run_program.cpp Remove the C++ runtime. Sayonara 2013-08-09 16:45:50 -07:00
rust_test_helpers.cpp Remove the C++ runtime. Sayonara 2013-08-09 16:45:50 -07:00
rust_type.h rt: Remove unused rust_clone_type_desc declaration 2013-08-16 13:24:25 -07:00
rust_upcall.cpp rt: Remove empty rust_upcall.h 2013-08-16 13:24:25 -07:00
rust_util.cpp Add a field borrow_offset to the type descriptor indicating 2013-08-11 13:59:45 -04:00
rust_util.h rt: Remove rust_env 2013-08-16 13:24:24 -07:00
rust_uv.cpp Instruct event loops to ignore SIGPIPE when constructed. 2013-08-19 16:26:50 -07:00
rustrt.def.in rt: Remove unused uv helpers 2013-08-16 13:24:25 -07:00