summaryrefslogtreecommitdiff
path: root/src/core/msgqueue.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-04-20 20:52:32 -0700
committerGarrett D'Amore <garrett@damore.org>2018-04-24 15:06:33 -0700
commitfdefff742662ed4eb476bf19b9dda245f86bc406 (patch)
treea4e132716debd64e434478f8814f368db052cbc6 /src/core/msgqueue.h
parente0b47b12d3d1462d07c5038e4f34f5282eeec675 (diff)
downloadnng-fdefff742662ed4eb476bf19b9dda245f86bc406.tar.gz
nng-fdefff742662ed4eb476bf19b9dda245f86bc406.tar.bz2
nng-fdefff742662ed4eb476bf19b9dda245f86bc406.zip
fixes #342 Want Surveyor/Respondent context support
fixes #360 core should nng_aio_begin before nng_aio_finish_error fixes #361 nng_send_aio should check for NULL message fixes #362 nni_msgq does not signal pollable on certain events This adds support for contexts for both sides of the surveyor pattern. Prior to this commit, the raw mode was completely broken, and there were numerous other bugs found and fixed. This integration includes *much* deeper validation of this pattern. Some changes to the core and other patterns have been made, where it was obvioius that we could make such improvements. (The obviousness stemming from the fact that RESPONDENT in particular is very closely derived from REP.)
Diffstat (limited to 'src/core/msgqueue.h')
-rw-r--r--src/core/msgqueue.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/msgqueue.h b/src/core/msgqueue.h
index 2f1a46eb..65215bd0 100644
--- a/src/core/msgqueue.h
+++ b/src/core/msgqueue.h
@@ -33,6 +33,10 @@ extern int nni_msgq_init(nni_msgq **, unsigned);
// messages that may be in the queue.
extern void nni_msgq_fini(nni_msgq *);
+// nni_msgq_flush discards any messages that are sitting in the queue.
+// It does not wake any writers that might be waiting.
+extern void nni_msgq_flush(nni_msgq *);
+
extern void nni_msgq_aio_put(nni_msgq *, nni_aio *);
extern void nni_msgq_aio_get(nni_msgq *, nni_aio *);