Skip to content

Commit c0ceae8

Browse files
committed
Merge pull request #98 from hintjens/master
Removed HWM on parent side of pipe for zthread_new
2 parents 7fe5632 + 65decab commit c0ceae8

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

src/zctx.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ struct _zctx_t {
6464
bool main; // TRUE if we're the main thread
6565
int iothreads; // Number of IO threads, default 1
6666
int linger; // Linger timeout, default 0
67-
int hwm; // HWM, default 1
6867
};
6968

7069

@@ -101,7 +100,6 @@ zctx_new (void)
101100
}
102101
self->iothreads = 1;
103102
self->main = TRUE;
104-
self->hwm = 1;
105103

106104
#if defined (__UNIX__)
107105
// Install signal handler for SIGINT and SIGTERM
@@ -189,23 +187,22 @@ zctx_set_linger (zctx_t *self, int linger)
189187

190188

191189
// --------------------------------------------------------------------------
192-
// Configure HWM value. This is used in zthread_fork
190+
// Deprecated method, does nothing - to be removed after 2013/05/14
193191

194192
void
195193
zctx_set_hwm (zctx_t *self, int hwm)
196194
{
197195
assert (self);
198-
self->hwm = hwm;
199196
}
200197

201198
// --------------------------------------------------------------------------
202-
// Get HWM value. This is used in zthread_fork
199+
// Deprecated method, does nothing - to be removed after 2013/05/14
203200

204201
int
205202
zctx_hwm (zctx_t *self)
206203
{
207204
assert (self);
208-
return self->hwm;
205+
return 0;
209206
}
210207

211208
// --------------------------------------------------------------------------

src/zthread.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,8 @@ zthread_fork (zctx_t *ctx, zthread_attached_fn *thread_fn, void *args)
176176
shim_t *shim = NULL;
177177
// Create our end of the pipe
178178
void *pipe = zsocket_new (ctx, ZMQ_PAIR);
179-
if (pipe) {
180-
zsocket_set_hwm (pipe, zctx_hwm (ctx));
179+
if (pipe)
181180
zsocket_bind (pipe, "inproc://zctx-pipe-%p", pipe);
182-
}
183181
else
184182
return NULL;
185183

0 commit comments

Comments
 (0)