mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-06 00:31:13 +01:00
Merge pull request #1591 from c-rack/check-hwm
Solution: use existing check_hwm() method
This commit is contained in:
commit
a8605f576e
1
AUTHORS
1
AUTHORS
@ -35,6 +35,7 @@ Christian Gudrian
|
|||||||
Christian Kamm
|
Christian Kamm
|
||||||
Chuck Remes
|
Chuck Remes
|
||||||
Conrad D. Steenberg
|
Conrad D. Steenberg
|
||||||
|
Constantin Rack
|
||||||
Dhammika Pathirana
|
Dhammika Pathirana
|
||||||
Dhruva Krishnamurthy
|
Dhruva Krishnamurthy
|
||||||
Dirk O. Kaar
|
Dirk O. Kaar
|
||||||
|
@ -206,7 +206,7 @@ bool zmq::pipe_t::check_write ()
|
|||||||
if (unlikely (!out_active || state != active))
|
if (unlikely (!out_active || state != active))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool full = hwm > 0 && msgs_written - peers_msgs_read == uint64_t (hwm);
|
bool full = !check_hwm();
|
||||||
|
|
||||||
if (unlikely (full)) {
|
if (unlikely (full)) {
|
||||||
out_active = false;
|
out_active = false;
|
||||||
|
@ -121,7 +121,7 @@ namespace zmq
|
|||||||
// in the peer.
|
// in the peer.
|
||||||
void hiccup ();
|
void hiccup ();
|
||||||
|
|
||||||
// Ensure the pipe wont block on receiving pipe_term.
|
// Ensure the pipe won't block on receiving pipe_term.
|
||||||
void set_nodelay ();
|
void set_nodelay ();
|
||||||
|
|
||||||
// Ask pipe to terminate. The termination will happen asynchronously
|
// Ask pipe to terminate. The termination will happen asynchronously
|
||||||
@ -130,13 +130,13 @@ namespace zmq
|
|||||||
// before actual shutdown.
|
// before actual shutdown.
|
||||||
void terminate (bool delay_);
|
void terminate (bool delay_);
|
||||||
|
|
||||||
// set the high water marks.
|
// Set the high water marks.
|
||||||
void set_hwms (int inhwm_, int outhwm_);
|
void set_hwms (int inhwm_, int outhwm_);
|
||||||
|
|
||||||
// set the boost to high water marks, used by inproc sockets so total hwm are sum of connect and bind sockets watermarks
|
// Set the boost to high water marks, used by inproc sockets so total hwm are sum of connect and bind sockets watermarks
|
||||||
void set_hwms_boost(int inhwmboost_, int outhwmboost_);
|
void set_hwms_boost(int inhwmboost_, int outhwmboost_);
|
||||||
|
|
||||||
// check HWM
|
// Returns true if HWM is not reached
|
||||||
bool check_hwm () const;
|
bool check_hwm () const;
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user