diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-12-26 12:13:49 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-12-26 12:53:46 -0800 |
| commit | b5826dac78e75520c26f2d84a952fe04d69fa2d3 (patch) | |
| tree | 707d73b1e52c638c9a4843e3480b3190131b111c /src/core/stream.c | |
| parent | 9cece0bdd4c044f029997b85b73d0b49f80ad1e6 (diff) | |
| download | nng-b5826dac78e75520c26f2d84a952fe04d69fa2d3.tar.gz nng-b5826dac78e75520c26f2d84a952fe04d69fa2d3.tar.bz2 nng-b5826dac78e75520c26f2d84a952fe04d69fa2d3.zip | |
aio: introduce nni_aio_reset to reset the aio before submitting more work
This allows some use cases to reset things like the counts and outputs, before
submitting more jobs. Providers should call this near the top of their
functions; this is done without any locks so it should be very fast.
Diffstat (limited to 'src/core/stream.c')
| -rw-r--r-- | src/core/stream.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/stream.c b/src/core/stream.c index 16e11eca..2c7a9ff3 100644 --- a/src/core/stream.c +++ b/src/core/stream.c @@ -140,12 +140,14 @@ nng_stream_free(nng_stream *s) void nng_stream_send(nng_stream *s, nng_aio *aio) { + nni_aio_reset(aio); s->s_send(s, aio); } void nng_stream_recv(nng_stream *s, nng_aio *aio) { + nni_aio_reset(aio); s->s_recv(s, aio); } |
