<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/libstd/rt/uv, branch master</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=master</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2013-10-29T22:56:16+00:00</updated>
<entry>
<title>Register new snapshots</title>
<updated>2013-10-29T22:56:16+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2013-10-29T21:14:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e203f30bc743ff3de271d8db80acd21991e903df'/>
<id>urn:sha1:e203f30bc743ff3de271d8db80acd21991e903df</id>
<content type='text'>
</content>
</entry>
<entry>
<title>auto merge of #10058 : alexcrichton/rust/uv-crate, r=brson</title>
<updated>2013-10-29T16:36:47+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2013-10-29T16:36:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=52f42f16387d0142944f376ea31c554c9caa2189'/>
<id>urn:sha1:52f42f16387d0142944f376ea31c554c9caa2189</id>
<content type='text'>
This is one of the final steps needed to complete #9128. It still needs a little bit of polish before closing that issue, but it's in a pretty much "done" state now.

The idea here is that the entire event loop implementation using libuv is now housed in `librustuv` as a completely separate library. This library is then injected (via `extern mod rustv`) into executable builds (similarly to how libstd is injected, tunable via `#[no_uv]`) to bring in the "rust blessed event loop implementation."

Codegen-wise, there is a new `event_loop_factory` language item which is tagged on a function with 0 arguments returning `~EventLoop`. This function's symbol is then inserted into the crate map for an executable crate, and if there is no definition of the `event_loop_factory` language item then the value is null.

What this means is that embedding rust as a library in another language just got a little harder. Libraries don't have crate maps, which means that there's no way to find the event loop implementation to spin up the runtime. That being said, it's always possible to build the runtime manually. This request also makes more runtime components public which should probably be public anyway. This new public-ness should allow custom scheduler setups everywhere regardless of whether you follow the `rt::start `path.
</content>
</entry>
<entry>
<title>Move rust's uv implementation to its own crate</title>
<updated>2013-10-29T15:39:22+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2013-10-22T22:13:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=201cab84e8f12ec73131ac4908e6779b277449a2'/>
<id>urn:sha1:201cab84e8f12ec73131ac4908e6779b277449a2</id>
<content type='text'>
There are a few reasons that this is a desirable move to take:

1. Proof of concept that a third party event loop is possible
2. Clear separation of responsibility between rt::io and the uv-backend
3. Enforce in the future that the event loop is "pluggable" and replacable

Here's a quick summary of the points of this pull request which make this
possible:

* Two new lang items were introduced: event_loop, and event_loop_factory.
  The idea of a "factory" is to define a function which can be called with no
  arguments and will return the new event loop as a trait object. This factory
  is emitted to the crate map when building an executable. The factory doesn't
  have to exist, and when it doesn't then an empty slot is in the crate map and
  a basic event loop with no I/O support is provided to the runtime.

* When building an executable, then the rustuv crate will be linked by default
  (providing a default implementation of the event loop) via a similar method to
  injecting a dependency on libstd. This is currently the only location where
  the rustuv crate is ever linked.

* There is a new #[no_uv] attribute (implied by #[no_std]) which denies
  implicitly linking to rustuv by default

Closes #5019
</content>
</entry>
<entry>
<title>Register new snapshots</title>
<updated>2013-10-28T23:56:24+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2013-10-28T23:56:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2290131543af4da764343c546efbd5c6dc9e7d71'/>
<id>urn:sha1:2290131543af4da764343c546efbd5c6dc9e7d71</id>
<content type='text'>
</content>
</entry>
<entry>
<title>auto merge of #10093 : alexcrichton/rust/issue-8811, r=pcwalton</title>
<updated>2013-10-28T12:36:31+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2013-10-28T12:36:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=672edb21d9d422486230fe7dcba60100bc077c4c'/>
<id>urn:sha1:672edb21d9d422486230fe7dcba60100bc077c4c</id>
<content type='text'>
Closes #8811
</content>
</entry>
<entry>
<title>auto merge of #10083 : alexcrichton/rust/timer-port, r=pcwalton</title>
<updated>2013-10-28T09:41:18+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2013-10-28T09:41:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=de3d36a763a09032a68aa9d47071840c8b4dd5a7'/>
<id>urn:sha1:de3d36a763a09032a68aa9d47071840c8b4dd5a7</id>
<content type='text'>
In addition to being able to sleep the current task, timers should be able to
create ports which get notified after a period of time.

Closes #10014
</content>
</entry>
<entry>
<title>Allow fail messages to be caught, and introduce the Any trait</title>
<updated>2013-10-28T07:50:32+00:00</updated>
<author>
<name>Marvin Löbel</name>
<email>loebel.marvin@gmail.com</email>
</author>
<published>2013-10-11T21:20:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fa8e71a8257f4226ab532d4bf268d3ecbfa98eb4'/>
<id>urn:sha1:fa8e71a8257f4226ab532d4bf268d3ecbfa98eb4</id>
<content type='text'>
Some code cleanup, sorting of import blocks

Removed std::unstable::UnsafeArc's use of Either

Added run-fail tests for the new FailWithCause impls

Changed future_result and try to return Result&lt;(), ~Any&gt;.

- Internally, there is an enum of possible fail messages passend around.
- In case of linked failure or a string message, the ~Any gets
  lazyly allocated in future_results recv method.
- For that, future result now returns a wrapper around a Port.
- Moved and renamed task::TaskResult into rt::task::UnwindResult
  and made it an internal enum.
- Introduced a replacement typedef `type TaskResult = Result&lt;(), ~Any&gt;`.
</content>
</entry>
<entry>
<title>Ignore a test which never completes on windows</title>
<updated>2013-10-27T17:58:32+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2013-10-27T17:58:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8455ad898cc20106251ddbff61e874abfcf95cbb'/>
<id>urn:sha1:8455ad898cc20106251ddbff61e874abfcf95cbb</id>
<content type='text'>
I'm not entirely sure why this is happening, but the server task is never seeing
the second send of the client task, and this test will very reliably fail to
complete on windows.
</content>
</entry>
<entry>
<title>Implement another error code found on windows.</title>
<updated>2013-10-26T23:04:05+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2013-10-26T23:04:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=651f5db4623526d416458e9f77632e7dd72f96a8'/>
<id>urn:sha1:651f5db4623526d416458e9f77632e7dd72f96a8</id>
<content type='text'>
Closes #8811
</content>
</entry>
<entry>
<title>auto merge of #10070 : alexcrichton/rust/fewer-missiles, r=brson</title>
<updated>2013-10-26T07:06:09+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2013-10-26T07:06:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d53159a643e1f4a7e1275e9a318b8505526d96ac'/>
<id>urn:sha1:d53159a643e1f4a7e1275e9a318b8505526d96ac</id>
<content type='text'>
This optimizes the `home_for_io` code path by requiring fewer scheduler
operations in some situtations.

When moving to your home scheduler, this no longer forces a context switch if
you're already on the home scheduler. Instead, the homing code now simply pins
you to your current scheduler (making it so you can't be stolen away). If you're
not on your home scheduler, then we context switch away, sending you to your
home scheduler.

When the I/O operation is done, then we also no longer forcibly trigger a
context switch. Instead, the action is cased on whether the task is homed or
not. If a task does not have a home, then the task is re-flagged as not having a
home and no context switch is performed. If a task is homed to the current
scheduler, then we don't do anything, and if the task is homed to a foreign
scheduler, then it's sent along its merry way.

I verified that there are about a third as many `write` syscalls done in print
operations now. Libuv uses write to implement async handles, and the homing
before and after each I/O operation was triggering a write on these async
handles. Additionally, using the terrible benchmark of printing 10k times in a
loop, this drives the runtime from 0.6s down to 0.3s (yay!).
</content>
</entry>
</feed>
