Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
f77edfce
Commit
f77edfce
authored
Aug 06, 2010
by
Martin Sustrik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Destruction of session is delayed till both in & out pipes are closed
parent
05d90849
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
12 deletions
+4
-12
pipe.cpp
src/pipe.cpp
+0
-5
pipe.hpp
src/pipe.hpp
+0
-4
session.cpp
src/session.cpp
+4
-3
No files found.
src/pipe.cpp
View file @
f77edfce
...
...
@@ -130,11 +130,6 @@ void zmq::reader_t::terminate ()
send_pipe_term
(
writer
);
}
bool
zmq
::
reader_t
::
is_terminating
()
{
return
terminating
;
}
void
zmq
::
reader_t
::
process_revive
()
{
// Forward the event to the sink (either socket or session).
...
...
src/pipe.hpp
View file @
f77edfce
...
...
@@ -67,10 +67,6 @@ namespace zmq
// Ask pipe to terminate.
void
terminate
();
// Returns true if the pipe is already terminating
// (say if delimiter was already read).
bool
is_terminating
();
private
:
reader_t
(
class
object_t
*
parent_
,
pipe_t
*
pipe_
,
uint64_t
lwm_
);
...
...
src/session.cpp
View file @
f77edfce
...
...
@@ -71,7 +71,8 @@ zmq::session_t::~session_t ()
bool
zmq
::
session_t
::
is_terminable
()
{
return
in_pipe
->
is_terminating
();
// The session won't send term_ack until both in & out pipe are closed.
return
!
in_pipe
&&
!
out_pipe
;
}
bool
zmq
::
session_t
::
read
(
::
zmq_msg_t
*
msg_
)
...
...
@@ -81,8 +82,6 @@ bool zmq::session_t::read (::zmq_msg_t *msg_)
if
(
!
in_pipe
->
read
(
msg_
))
{
active
=
false
;
if
(
in_pipe
->
is_terminating
())
finalise
();
return
false
;
}
...
...
@@ -179,11 +178,13 @@ void zmq::session_t::terminated (reader_t *pipe_)
{
active
=
false
;
in_pipe
=
NULL
;
finalise
();
}
void
zmq
::
session_t
::
terminated
(
writer_t
*
pipe_
)
{
out_pipe
=
NULL
;
finalise
();
}
void
zmq
::
session_t
::
activated
(
reader_t
*
pipe_
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment