skip to content
[readonly]
==> README.md <==
1# @ajax/mesh-reply
2
3One-shot replies between threads: a requester makes a reply, hands a sender reference to the thread that
4answers, and waits with a timeout for one `mesh_result` (Ok text, Ok number, Ok bytes, or an error). An
5answerer that drops its reference unanswered is seen by the waiter at once; an answer that arrives after
6the waiter gave up is freed with the channel.
7
8## Ported from
9
10[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT):
11`crates/mesh-host/src/shared.rs`'s `Reply` (`Sender<Result<String, String>>`), `TaskReply`
12(`Result<u32, String>`) and `HttpReply` (`Result<Vec<u8>, String>`): one C type for the three.
13
14## Tests
15
16- `tests/reply.c`: answered, dropped unanswered, answered from a thread, answered too late (no leak under
17  ASan), values, bytes and clones.
18
19## Licence
20
21MIT. See the repository's LICENSE.