Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Difference From ump-0.12.0 To ump-0.12.1
2024-01-12
| ||
14:31 | Remove dev-docs feature. check-in: 2ba8f53f39 user: jan tags: trunk | |
2023-10-02
| ||
13:32 | Release maintenance. check-in: 45f4a89db5 user: jan tags: trunk, ump-0.12.1 | |
2023-09-17
| ||
10:16 | Add changelog separators. check-in: e1451ac681 user: jan tags: trunk | |
2023-08-31
| ||
14:34 | Document ReplyContext. check-in: 61295fc1c3 user: jan tags: trunk | |
2023-08-14
| ||
23:03 | Release maintenance. check-in: b08bb813bf user: jan tags: trunk, ump-0.12.0 | |
22:55 | Update swctx to 0.2.1. check-in: 3eaac7ef46 user: jan tags: trunk | |
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 36 37 | - + - - - + - + - + | [package] name = "ump" |
︙ |
Changes to src/client.rs.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | + + - + + + - + - - - - - - | use crate::{err::Error, server::ServerQueueNode}; use super::rctx::RCtxState; |
︙ | |||
52 53 54 55 56 57 58 | 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 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 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + - - - + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | // One side-effect is that some of the state semantics becomes more // complicated. // The central repo has such an implementation checked in, but it seems to // have some more corner cases that aren't properly handled. let (sctx, wctx) = swctx::mkpair(); self |
Changes to src/lib.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 35 36 | - - + + - - - + + - - - - - - + + + + + + + + - - - - + + + - - + + - - + | //! Micro Message Pass (ump) is a library for passing messages between //! thread/tasks. It has some similarities with the common mpsc channel //! libraries, but with the most notable difference that each time a client //! sends a message the server must send back a reply. //! //! The primary purpose of ump is to create simple RPC like designs, but //! between threads/tasks within a process rather than between processes over //! networks. //! //! # High-level usage overview |
︙ | |||
71 72 73 74 75 76 77 | 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 110 111 112 113 114 115 116 117 118 119 120 | - + - - - + + + - + + + + + | //! There are some potentially useful semantic quirks that can be good to know //! about, but some of them should be used with caution. This section will //! describe some semantics that you can rely on, and others that you should be //! careful about relying on. //! //! ## Stable invariants //! |
︙ | |||
126 127 128 129 130 131 132 | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | - + - - + | /// The `S` type parameter is the "request" data type that clients will /// transfer to the server. The `R` type parameter is the "receive" data type /// that clients will receive from the server. The `E` type parameter can be /// used to return application specific errors from the server to the client. pub fn channel<S, R, E>() -> (Server<S, R, E>, Client<S, R, E>) { let (qpusher, qpuller) = sigq::new(); |
Changes to src/rctx.rs.
︙ | |||
10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | + + | #[derive(Clone, Default)] pub(crate) enum RCtxState { #[default] Queued, Active } /// Object used to respond to requests that have been received by a /// [`Server`](super::Server). pub struct ReplyContext<T, E>(swctx::SetCtx<T, RCtxState, E>); impl<T, E> ReplyContext<T, E> { /// Send a reply back to originating client. /// /// # Example /// ``` |
︙ |
Changes to src/server.rs.
︙ | |||
12 13 14 15 16 17 18 | 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 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | + - + - - - + + + + + + + + + + + + + + + + + + + + + - - - - - + - + | } /// Representation of a server object. /// /// Each instantiation of a [`Server`] object represents an end-point which /// will be used to receive messages from connected [`Client`](crate::Client) /// objects. #[repr(transparent)] |
Added tests/clnt_disappear.rs.
|
Deleted tests/queue_cleanup.rs.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Added tests/svc_disappear.rs.