Skip to content

External pointer issue with xml2 and furrr #502

Answered by HenrikBengtsson
mdzorn asked this question in Q&A
Discussion options

You must be logged in to vote

Is there a better solution than having the worker processes write the data to disk and reading them in again at the manager process (or uploading multiple files which I need to clear with the vendor)?

I don't think so. AFAIU, the xml2 object can only be used in the R session where they were created, which means they cannot be passed on to a parallel R workers. It's not clear to me how you create these objects in the first place, but I assume from your description that you grab them from an online resource rather than an existing file.

So, similarly to your idea of writing to file and re-reading in the parallel worker, you can write the xml_document object to a "raw" object in R, then ex…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@mdzorn
Comment options

@HenrikBengtsson
Comment options

@HenrikBengtsson
Comment options

Answer selected by mdzorn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment