From bda2da83353b26a1b2b1f737a6ba3938e26bba19 Mon Sep 17 00:00:00 2001 From: alecmocatta Date: Fri, 30 Aug 2019 18:19:07 +0100 Subject: [PATCH 1/3] make Key hashable for new notify --- src/channel/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/channel/mod.rs b/src/channel/mod.rs index 7e27e73..6b343ea 100644 --- a/src/channel/mod.rs +++ b/src/channel/mod.rs @@ -16,7 +16,7 @@ use super::Fd; pub use self::{inner::*, inner_states::*}; pub use tcp_typed::{socket_forwarder, SocketForwardee, SocketForwarder}; -#[derive(Copy, Clone, PartialEq, Eq)] +#[derive(Copy, Clone, PartialEq, Eq, Hash)] struct Key(*const ()); /// Because `*const ()`. Pointers aren't really not Send+Sync, it's more of a lint. unsafe impl marker::Send for Key {} From 1f8b344205739ff0ca59621c15549e91b8fe9521 Mon Sep 17 00:00:00 2001 From: alecmocatta Date: Fri, 30 Aug 2019 18:38:05 +0100 Subject: [PATCH 2/3] v0.1.4 --- Cargo.toml | 6 +++--- README.md | 14 +++++++------- constellation-internal/Cargo.toml | 4 ++-- constellation-internal/src/lib.rs | 2 +- src/lib.rs | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4aa1379..eef0eb6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "constellation-rs" -version = "0.1.3" +version = "0.1.4" license = "Apache-2.0" authors = ["Alec Mocatta "] categories = ["development-tools","network-programming","concurrency","asynchronous","command-line-utilities"] @@ -12,7 +12,7 @@ Constellation is a framework for Rust (nightly) that aides in the writing, debug """ repository = "https://github.com/alecmocatta/constellation" homepage = "https://github.com/alecmocatta/constellation" -documentation = "https://docs.rs/constellation-rs/0.1.3" +documentation = "https://docs.rs/constellation-rs/0.1.4" readme = "README.md" edition = "2018" autotests = true @@ -32,7 +32,7 @@ fringe = ["serde_pipe/fringe"] no_alloc = ["constellation-internal/no_alloc"] [dependencies] -constellation-internal = { path = "constellation-internal", version = "=0.1.3" } +constellation-internal = { path = "constellation-internal", version = "=0.1.4" } atty = "0.2" backtrace = "0.3" bincode = "1.0" diff --git a/README.md b/README.md index cc75c26..c0efb5b 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@

- Docs + Docs

Constellation is a framework for Rust (nightly) that aides in the writing, debugging and deployment of distributed programs. It draws heavily from [Erlang/OTP](https://en.wikipedia.org/wiki/Erlang_(programming_language)), [MPI](https://en.wikipedia.org/wiki/Message_Passing_Interface), and [CSP](https://en.wikipedia.org/wiki/Communicating_sequential_processes); and leverages the Rust ecosystem where it can including [serde](https://serde.rs/) + [bincode](https://github.com/servo/bincode) for network serialization, and [mio](https://github.com/tokio-rs/mio) and [futures-rs](https://github.com/rust-lang-nursery/futures-rs) for asynchronous channels over TCP. @@ -27,13 +27,13 @@ For leveraging Constellation directly, read on. ## Constellation framework -* Constellation is a framework that's initialised with a call to [`init()`](https://docs.rs/constellation-rs/0.1.3/constellation/fn.init.html) at the beginning of your program. -* You can [`spawn(closure)`](https://docs.rs/constellation-rs/0.1.3/constellation/fn.spawn.html) new processes, which run `closure`. +* Constellation is a framework that's initialised with a call to [`init()`](https://docs.rs/constellation-rs/0.1.4/constellation/fn.init.html) at the beginning of your program. +* You can [`spawn(closure)`](https://docs.rs/constellation-rs/0.1.4/constellation/fn.spawn.html) new processes, which run `closure`. * `spawn(closure)` returns the Pid of the new process. -* You can communicate between processes by creating channels with [`Sender::new(remote_pid)`](https://docs.rs/constellation-rs/0.1.3/constellation/struct.Sender.html#method.new) and [`Receiver::new(remote_pid)`](https://docs.rs/constellation-rs/0.1.3/constellation/struct.Receiver.html#method.new). -* Channels can be used asynchronously with [`sender.send(value).await`](https://docs.rs/constellation-rs/0.1.3/constellation/struct.Sender.html#method.send) and [`receiver.recv().await`](https://docs.rs/constellation-rs/0.1.3/constellation/struct.Receiver.html#method.recv). +* You can communicate between processes by creating channels with [`Sender::new(remote_pid)`](https://docs.rs/constellation-rs/0.1.4/constellation/struct.Sender.html#method.new) and [`Receiver::new(remote_pid)`](https://docs.rs/constellation-rs/0.1.4/constellation/struct.Receiver.html#method.new). +* Channels can be used asynchronously with [`sender.send(value).await`](https://docs.rs/constellation-rs/0.1.4/constellation/struct.Sender.html#method.send) and [`receiver.recv().await`](https://docs.rs/constellation-rs/0.1.4/constellation/struct.Receiver.html#method.recv). * [futures-rs](https://github.com/rust-lang-nursery/futures-rs) provides useful functions and adapters including `select()` and `join()` for working with channels. -* You can also block on channels with the [`.block()`](https://docs.rs/constellation-rs/0.1.3/constellation/trait.FutureExt1.html#method.block) convenience method: `sender.send().block()` and `receiver.recv().block()`. +* You can also block on channels with the [`.block()`](https://docs.rs/constellation-rs/0.1.4/constellation/trait.FutureExt1.html#method.block) convenience method: `sender.send().block()` and `receiver.recv().block()`. * For more information on asynchronous programming in Rust check out the [Async Book](https://rust-lang.github.io/async-book/index.html)! Here's a simple example recursively spawning processes to distribute the task of finding Fibonacci numbers: @@ -248,7 +248,7 @@ Please file an issue if you experience any other requirements. ## API -[see Rust doc](https://docs.rs/constellation-rs/0.1.3) +[see Rust doc](https://docs.rs/constellation-rs/0.1.4) ## Testing diff --git a/constellation-internal/Cargo.toml b/constellation-internal/Cargo.toml index b3a81b3..5a6e2a3 100644 --- a/constellation-internal/Cargo.toml +++ b/constellation-internal/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "constellation-internal" -version = "0.1.3" +version = "0.1.4" license = "Apache-2.0" authors = ["Alec Mocatta "] categories = ["development-tools","network-programming","concurrency","asynchronous"] @@ -10,7 +10,7 @@ Common components for the `constellation` framework. """ repository = "https://github.com/alecmocatta/constellation" homepage = "https://github.com/alecmocatta/constellation" -documentation = "https://docs.rs/constellation-internal/0.1.3" +documentation = "https://docs.rs/constellation-internal/0.1.4" edition = "2018" [features] diff --git a/constellation-internal/src/lib.rs b/constellation-internal/src/lib.rs index 8fd6f79..2fc9648 100644 --- a/constellation-internal/src/lib.rs +++ b/constellation-internal/src/lib.rs @@ -1,4 +1,4 @@ -#![doc(html_root_url = "https://docs.rs/constellation-internal/0.1.3")] +#![doc(html_root_url = "https://docs.rs/constellation-internal/0.1.4")] #![warn( // missing_copy_implementations, missing_debug_implementations, diff --git a/src/lib.rs b/src/lib.rs index 783ea7d..15cb66b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -9,7 +9,7 @@ //! //! The only requirement to use is that [`init()`](init) must be called immediately inside your application's `main()` function. -#![doc(html_root_url = "https://docs.rs/constellation-rs/0.1.3")] +#![doc(html_root_url = "https://docs.rs/constellation-rs/0.1.4")] #![cfg_attr(feature = "nightly", feature(read_initializer))] #![feature(cfg_doctest)] #![warn( From c195c8b2fc4889f2d3db302a1b629e3b1400957b Mon Sep 17 00:00:00 2001 From: alecmocatta Date: Fri, 30 Aug 2019 22:00:50 +0100 Subject: [PATCH 3/3] re-enable CI autoCancel --- azure-pipelines.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 19a8fa8..a1ece06 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,8 +1,5 @@ trigger: ["master"] -pr: - autoCancel: false - branches: - include: ["master"] +pr: ["master"] resources: repositories: