Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Difference From ump-0.9.0 To ump-0.10.0
2023-07-27
| ||
01:31 | Use sigq 0.13.3 to get puller bugfix. check-in: 3dece6432a user: jan tags: trunk | |
2023-07-26
| ||
21:01 | Release maintenance. check-in: 95345f9568 user: jan tags: trunk, ump-0.10.0 | |
20:55 | Typo. check-in: 0485b4dd20 user: jan tags: trunk | |
2023-07-25
| ||
02:45 | Update to sigq 0.13.1 and make server fail to wait for new messages if there are none to pickup and all clients have been dropped. check-in: 8877adb2d3 user: jan tags: trunk | |
2022-09-09
| ||
18:17 | 0.9.0 release preparation. check-in: 71b2832c90 user: jan tags: trunk, ump-0.9.0 | |
17:55 | Hello version 0.9.0. check-in: 0ac544acc3 user: jan tags: trunk | |
Changes to .efiles.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | - - + + + + + + + + | Cargo.toml README.md |
Changes to Cargo.toml.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | - + - + - + - - + + | [package] name = "ump" |
Changes to benches/add_server.rs.
︙ | |||
13 14 15 16 17 18 19 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | - + - - + | pub fn criterion_benchmark(c: &mut Criterion) { let mut group = c.benchmark_group("send operation"); let (server, client) = channel::<Ops, i32, ()>(); let server_thread = thread::spawn(move || { let mut croak = false; |
︙ |
Changes to examples/cloneclientserver.rs.
︙ | |||
21 22 23 24 25 26 27 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | - + | } fn main() { let (server, client) = channel::<Request, Reply, ()>(); let client_blueprint = client.clone(); let server_thread = thread::spawn(move || loop { |
︙ |
Changes to examples/many_once.rs.
| 1 2 3 4 5 6 7 8 | - + - |
|
︙ | |||
28 29 30 31 32 33 34 | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | - + | let server_thread = thread::spawn(move || { let mut count = 0; // Keep looping until each client as sent a message while count < nclients { // Wait for data to arrive from a client println!("Server waiting for message .."); |
︙ | |||
52 53 54 55 56 57 58 | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | - + | let mut join_handles = Vec::new(); for i in 0..nclients { let client_clone = client.clone(); let client_thread = thread::spawn(move || { let name = format!("Client {}", i + 1); let msg = String::from(&name); println!("{} sending '{}'", name, msg); |
Changes to examples/simple.rs.
1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | - + - + | use std::thread; use ump::channel; fn main() { let (server, client) = channel::<String, String, ()>(); let server_thread = thread::spawn(move || { // Wait for data to arrive from a client println!("Server waiting for message .."); |
Changes to examples/threaded_handler.rs.
| 1 2 3 4 5 6 7 8 | - + - |
|
︙ | |||
21 22 23 24 25 26 27 | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | - + | let server_thread = thread::spawn(move || { let mut count = 0; // Keep looping until each client as sent a message while count < nclients { // Wait for data to arrive from a client println!("Server waiting for message .."); |
︙ | |||
49 50 51 52 53 54 55 | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | - + | let mut join_handles = Vec::new(); for i in 0..nclients { let client_clone = client.clone(); let client_thread = thread::spawn(move || { let name = format!("Client {}", i + 1); let msg = String::from(&name); println!("{} sending '{}'", name, msg); |
Changes to src/client.rs.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - - - - - - + - - + |
|
︙ | |||
48 49 50 51 52 53 54 | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | - - - - - - + + - - - - - + + + + + - - - + - - - - - + + - - - - - + + + + + - - - - + | /// If the server never replied to the message and the reply context was /// dropped `Err(Error::NoReply)` will be returned. /// /// If an application specific error occurs it will be returned as a /// `Err(Error::App(E))`, where `E` is the error type used when creating the /// [`channel`](crate::channel). pub fn send(&self, out: S) -> Result<R, Error<E>> { |
Changes to src/err.rs.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | + + + + | use std::fmt; /// Module-specific error codes. #[derive(Debug)] pub enum Error<E> { /// The server object has shut down. This happens when clients: /// - attempt to send messages to a server that has been deallocated. /// - have their requests dropped from the serrver's queue because the /// server itself was deallocated. ServerDisappeared, /// There are no more nodes to pick up in the queue and all client /// end-points have been dropped. ClientsDisappeared, /// The message was delivered to the server, but the reply context was /// released before sending back a reply. NoReply, /// Application-specific error. /// The `E` type is typically declared as the third generic parameter to |
︙ | |||
44 45 46 47 48 49 50 | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | - + + | crate::rctx::Error::App(e) => Error::App(e) } } } impl<E: fmt::Debug> fmt::Display for Error<E> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { |
Changes to src/lib.rs.
︙ | |||
31 32 33 34 35 36 37 | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | - - + - - - - + + + + - + - + - - - - + + + + - - + + - - - - - + + + + + - + - | //! //! # Example //! ``` //! use std::thread; //! //! use ump::channel; //! |
︙ | |||
105 106 107 108 109 110 111 | 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | - - + - - - - - + - - + + - - - - + - - | mod client; mod err; mod rctx; mod server; pub use err::Error; |
Added src/rctx.rs.
|
Changes to src/rctx/err.rs.
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - + | App(E) } impl<E: fmt::Debug> std::error::Error for Error<E> {} impl<E: fmt::Debug> fmt::Display for Error<E> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { |
︙ |
Changes to src/rctx/inner.rs.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 | - - - - + + + + + + |
|
︙ | |||
65 66 67 68 69 70 71 | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | - + | drop(mg); self.signal_waiters(); } pub(crate) fn signal_waiters(&self) { let mut g = self.taskwaker.lock(); |
︙ | |||
147 148 149 150 151 152 153 | 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | - - - - + + + + - - - + | impl<I, E> Drop for InnerReplyContext<I, E> { /// If the reply context never left the server queue before being destroyed /// it means that the server has died. Signal this to the original caller /// waiting for a reply. fn drop(&mut self) { let mut do_signal: bool = false; let mut mg = self.data.lock(); |
︙ |
Deleted src/rctx/mod.rs.
| - - - - - - - - - - - - - - - - - - |
|
Changes to src/rctx/public.rs.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | - + - - - - - - - - - - - - - + + + + + + + + + + - |
|
︙ | |||
55 56 57 58 59 60 61 | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - + - - - - + + + + - - - + | /// use ump::{channel, Error}; /// /// #[derive(Debug, PartialEq)] /// enum MyError { /// SomeError(String) /// } /// |
︙ |
Changes to src/server.rs.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | - - + - - + - + - - + + - + - - + + + + + + - + - + |
|
Changes to tests/async_client.rs.
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | - + | let tokrt = tokio::runtime::Runtime::new().unwrap(); let niterations = 256; let (server, client) = channel::<Request, Reply, ()>(); let server_thread = thread::spawn(move || loop { |
︙ |
Changes to tests/fail.rs.
︙ | |||
10 11 12 13 14 15 16 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | - + - + | #[test] fn sync_expect_noreply() { let (server, client) = channel::<String, String, MyError>(); let server_thread = thread::spawn(move || { // Wait for data to arrive from a client |
︙ | |||
38 39 40 41 42 43 44 | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | - + | fn async_expect_noreply() { let tokrt = tokio::runtime::Runtime::new().unwrap(); let (server, client) = channel::<String, String, MyError>(); let server_thread = thread::spawn(move || { // Wait for data to arrive from a client |
︙ |
Changes to tests/noreply.rs.
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | - + - + | // Make sure that the ReplyContext aborts on Drop of no reply was sent. use std::thread; use ump::{channel, Error}; #[test] fn sync_expect_noreply() { let (server, client) = channel::<String, String, ()>(); let server_thread = thread::spawn(move || { // Wait for data to arrive from a client |
︙ | |||
34 35 36 37 38 39 40 | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | - + | fn async_expect_noreply() { let tokrt = tokio::runtime::Runtime::new().unwrap(); let (server, client) = channel::<String, String, ()>(); let server_thread = thread::spawn(move || { // Wait for data to arrive from a client |
︙ |
Changes to tests/queue_cleanup.rs.
︙ | |||
12 13 14 15 16 17 18 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | - + | // Should be doing something more robust .. let one_second = time::Duration::from_secs(1); thread::sleep(one_second); drop(server); }); let msg = String::from("Client"); |
︙ |
Changes to tests/stress.rs.
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | - - + + | #[test] fn one_at_a_time() { let (server, client) = channel::<Ops, i32, ()>(); let server_thread = thread::spawn(move || { let mut croak = false; |
︙ | |||
54 55 56 57 58 59 60 | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | - + | let niterations = 256; let server_thread = thread::spawn(move || { let mut count = 0; let mut handles = Vec::new(); // +1 because we want to wait for the croak message as well while count < niterations + 1 { |
︙ |
Changes to www/changelog.md.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | + + + + + + + + + + + + + + + | # Change Log ## [Unreleased] ### Added ### Changed ### Removed ## [0.10.0] - 2023-07-26 ### Added - Server's receive methods will fail with `Error::ClientsDisappeared` if all the associated Client objects have been dropped. ### Changed - Runtime dependencies: - Updated `sigq` to `0.13.2`. - Development dependencies: - Updated `criterion` to `0.5.1` ## [0.9.0] - 2022-09-09 ### Added - Explicitly set MSRV is `1.36` |
︙ |