Skip to content

Commit

Permalink
be sure to clean up old zmq handles (libzmq#1108)
Browse files Browse the repository at this point in the history
  • Loading branch information
mschubert committed Sep 29, 2018
1 parent 671e0ff commit ae9cb97
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions R/workers.r
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ workers = function(n_jobs, data=NULL, reuse=TRUE, template=list(), log_worker=FA
if (n_jobs == 0)
return(get("LOCAL", envir=parent.env(environment()))$new())

gc() # be sure to clean up old rzmq handles (zeromq/libzmq/issues/1108)
qsys = get(toupper(qsys_id), envir=parent.env(environment()))
qsys = qsys$new(data=data, reuse=reuse)

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-3-worker.r
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ master = paste("tcp://localhost", port, sep=":")
start_worker = function() {
skip_if_not(has_localhost)
skip_on_os("windows")

gc() # be sure to clean up old rzmq handles (zeromq/libzmq/issues/1108)
p = parallel::mcparallel(worker(master))
msg = recv(p, socket)
testthat::expect_equal(msg$id, "WORKER_UP")
Expand Down

0 comments on commit ae9cb97

Please sign in to comment.