From f7463b4bd9b549a152b28aff959113b9ab56959a Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 13 Jul 2017 22:19:20 -0700 Subject: Use the same pipe teardown in all circumstances. --- src/core/pipe.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/core/pipe.h') diff --git a/src/core/pipe.h b/src/core/pipe.h index 8fba2c52..2f56e788 100644 --- a/src/core/pipe.h +++ b/src/core/pipe.h @@ -50,11 +50,12 @@ extern uint32_t nni_pipe_id(nni_pipe *); // operations against will return NNG_ECLOSED. extern void nni_pipe_close(nni_pipe *); -// nni_pipe_remove is called by the protocol when it is done with the socket. -// The pipe should already be closed; it will be unregistered and it's -// resources released back to the system. The protocol MUST not reference -// the pipe after this. -extern void nni_pipe_remove(nni_pipe *); +// nni_pipe_stop is called to begin the process of tearing down the socket. +// This function runs asynchronously, and takes care to ensure that no +// other consumers are referencing the pipe. We assume that either the +// socket (protocol code) or endpoint may have references to the pipe +// when this function is called. The pipe cleanup is asynchronous and +// make take a while depending on scheduling, etc. extern void nni_pipe_stop(nni_pipe *); // Used only by the socket core - as we don't wish to expose the details -- cgit v1.2.3-70-g09d2