Skip to content

Commit 29b2b6d

Browse files
Allow 'backend' to be a list (for backend.version=1)
1 parent 165b861 commit 29b2b6d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/backend_api-ClusterFuture-class.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,8 @@ receiveMessageFromWorker <- function(future, ...) {
369369
recvResult <- importParallel("recvResult")
370370

371371
backend <- future[["backend"]]
372-
if (!inherits(backend, "FutureBackend")) {
373-
stop(sprintf("[INTERNAL ERROR] receiveMessageFromWorker(): the 'backend' element of the %s object is not a FutureBackend object: %s", class(future)[1], class(backend)[1]))
372+
if (!inherits(backend, "FutureBackend") && !is.list(backend)) {
373+
stop(sprintf("[INTERNAL ERROR] receiveMessageFromWorker(): the 'backend' element of the %s object is neither a FutureBackend object nor a list: %s", class(future)[1], class(backend)[1]))
374374
}
375375
workers <- backend$workers
376376
reg <- backend$reg

0 commit comments

Comments
 (0)