<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/libstd/comm/sync.rs, branch try</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=try</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=try'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2014-12-29T20:16:49+00:00</updated>
<entry>
<title>std: Second pass stabilization for `comm`</title>
<updated>2014-12-29T20:16:49+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2014-12-23T19:53:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=bc83a009f655dd3896be4a7cd33cac8032a605f2'/>
<id>urn:sha1:bc83a009f655dd3896be4a7cd33cac8032a605f2</id>
<content type='text'>
This commit is a second pass stabilization for the `std::comm` module,
performing the following actions:

* The entire `std::comm` module was moved under `std::sync::mpsc`. This movement
  reflects that channels are just yet another synchronization primitive, and
  they don't necessarily deserve a special place outside of the other
  concurrency primitives that the standard library offers.
* The `send` and `recv` methods have all been removed.
* The `send_opt` and `recv_opt` methods have been renamed to `send` and `recv`.
  This means that all send/receive operations return a `Result` now indicating
  whether the operation was successful or not.
* The error type of `send` is now a `SendError` to implement a custom error
  message and allow for `unwrap()`. The error type contains an `into_inner`
  method to extract the value.
* The error type of `recv` is now `RecvError` for the same reasons as `send`.
* The `TryRecvError` and `TrySendError` types have had public reexports removed
  of their variants and the variant names have been tweaked with enum
  namespacing rules.
* The `Messages` iterator is renamed to `Iter`

This functionality is now all `#[stable]`:

* `Sender`
* `SyncSender`
* `Receiver`
* `std::sync::mpsc`
* `channel`
* `sync_channel`
* `Iter`
* `Sender::send`
* `Sender::clone`
* `SyncSender::send`
* `SyncSender::try_send`
* `SyncSender::clone`
* `Receiver::recv`
* `Receiver::try_recv`
* `Receiver::iter`
* `SendError`
* `RecvError`
* `TrySendError::{mod, Full, Disconnected}`
* `TryRecvError::{mod, Empty, Disconnected}`
* `SendError::into_inner`
* `TrySendError::into_inner`

This is a breaking change due to the modification of where this module is
located, as well as the changing of the semantics of `send` and `recv`. Most
programs just need to rename imports of `std::comm` to `std::sync::mpsc` and
add calls to `unwrap` after a send or a receive operation.

[breaking-change]
</content>
</entry>
<entry>
<title>Make Send and Sync traits unsafe</title>
<updated>2014-12-26T16:26:33+00:00</updated>
<author>
<name>Flavio Percoco</name>
<email>flaper87@gmail.com</email>
</author>
<published>2014-12-21T23:49:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f436f9ca2963e33cc41802370bb9c551c833970e'/>
<id>urn:sha1:f436f9ca2963e33cc41802370bb9c551c833970e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Require types to opt-in Sync</title>
<updated>2014-12-26T16:26:32+00:00</updated>
<author>
<name>Flavio Percoco</name>
<email>flaper87@gmail.com</email>
</author>
<published>2014-12-06T16:39:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fb803a857000813e4d572900799f0498fb20050b'/>
<id>urn:sha1:fb803a857000813e4d572900799f0498fb20050b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Revise std::thread API to join by default</title>
<updated>2014-12-19T07:31:52+00:00</updated>
<author>
<name>Aaron Turon</name>
<email>aturon@mozilla.com</email>
</author>
<published>2014-12-14T08:05:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a27fbac86849e07a0a6c746869d8f78319bd3a16'/>
<id>urn:sha1:a27fbac86849e07a0a6c746869d8f78319bd3a16</id>
<content type='text'>
This commit is part of a series that introduces a `std::thread` API to
replace `std::task`.

In the new API, `spawn` returns a `JoinGuard`, which by default will
join the spawned thread when dropped. It can also be used to join
explicitly at any time, returning the thread's result. Alternatively,
the spawned thread can be explicitly detached (so no join takes place).

As part of this change, Rust processes now terminate when the main
thread exits, even if other detached threads are still running, moving
Rust closer to standard threading models. This new behavior may break code
that was relying on the previously implicit join-all.

In addition to the above, the new thread API also offers some built-in
support for building blocking abstractions in user space; see the module
doc for details.

Closes #18000

[breaking-change]
</content>
</entry>
<entry>
<title>Fallout from new thread API</title>
<updated>2014-12-19T07:31:51+00:00</updated>
<author>
<name>Aaron Turon</name>
<email>aturon@mozilla.com</email>
</author>
<published>2014-12-07T02:34:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=43ae4b3301cc0605839778ecf59effb32b752e33'/>
<id>urn:sha1:43ae4b3301cc0605839778ecf59effb32b752e33</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove rt::{mutex, exclusive}</title>
<updated>2014-12-19T07:31:51+00:00</updated>
<author>
<name>Aaron Turon</name>
<email>aturon@mozilla.com</email>
</author>
<published>2014-12-01T16:49:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d8e4780b0b59636cd979a60434a407142e407ac9'/>
<id>urn:sha1:d8e4780b0b59636cd979a60434a407142e407ac9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add blocking support module for channels</title>
<updated>2014-12-19T07:31:51+00:00</updated>
<author>
<name>Aaron Turon</name>
<email>aturon@mozilla.com</email>
</author>
<published>2014-12-01T16:14:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7fd7ce682dd6f98d456d817a297b15bdc9841190'/>
<id>urn:sha1:7fd7ce682dd6f98d456d817a297b15bdc9841190</id>
<content type='text'>
</content>
</entry>
<entry>
<title>libs: merge librustrt into libstd</title>
<updated>2014-12-19T07:31:34+00:00</updated>
<author>
<name>Aaron Turon</name>
<email>aturon@mozilla.com</email>
</author>
<published>2014-11-24T03:21:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2b3477d373603527d23cc578f3737857b7b253d7'/>
<id>urn:sha1:2b3477d373603527d23cc578f3737857b7b253d7</id>
<content type='text'>
This commit merges the `rustrt` crate into `std`, undoing part of the
facade. This merger continues the paring down of the runtime system.

Code relying on the public API of `rustrt` will break; some of this API
is now available through `std::rt`, but is likely to change and/or be
removed very soon.

[breaking-change]
</content>
</entry>
<entry>
<title>Merge libsync into libstd</title>
<updated>2014-11-24T18:51:39+00:00</updated>
<author>
<name>Aaron Turon</name>
<email>aturon@mozilla.com</email>
</author>
<published>2014-11-23T20:52:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=985acfdb67d550d0259fcdcfbeed0a86ec3da9d0'/>
<id>urn:sha1:985acfdb67d550d0259fcdcfbeed0a86ec3da9d0</id>
<content type='text'>
This patch merges the `libsync` crate into `libstd`, undoing part of the
facade. This is in preparation for ultimately merging `librustrt`, as
well as the upcoming rewrite of `sync`.

Because this removes the `libsync` crate, it is a:

[breaking-change]

However, all uses of `libsync` should be able to reroute through
`std::sync` and `std::comm` instead.
</content>
</entry>
<entry>
<title>sync: Move underneath libstd</title>
<updated>2014-06-11T17:00:43+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2014-06-07T18:13:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b1c9ce9c6f0eb7d4a7df1aad6b6799f4b548181c'/>
<id>urn:sha1:b1c9ce9c6f0eb7d4a7df1aad6b6799f4b548181c</id>
<content type='text'>
This commit is the final step in the libstd facade, #13851. The purpose of this
commit is to move libsync underneath the standard library, behind the facade.
This will allow core primitives like channels, queues, and atomics to all live
in the same location.

There were a few notable changes and a few breaking changes as part of this
movement:

* The `Vec` and `String` types are reexported at the top level of libcollections
* The `unreachable!()` macro was copied to libcore
* The `std::rt::thread` module was moved to librustrt, but it is still
  reexported at the same location.
* The `std::comm` module was moved to libsync
* The `sync::comm` module was moved under `sync::comm`, and renamed to `duplex`.
  It is now a private module with types/functions being reexported under
  `sync::comm`. This is a breaking change for any existing users of duplex
  streams.
* All concurrent queues/deques were moved directly under libsync. They are also
  all marked with #![experimental] for now if they are public.
* The `task_pool` and `future` modules no longer live in libsync, but rather
  live under `std::sync`. They will forever live at this location, but they may
  move to libsync if the `std::task` module moves as well.

[breaking-change]
</content>
</entry>
</feed>
