Skip to content

Commit

Permalink
Render docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Jun 22, 2018
1 parent b223ae7 commit a75f8ba
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 20 deletions.
10 changes: 6 additions & 4 deletions R/multi.R
Expand Up @@ -46,10 +46,12 @@
#' response data in same structure as \link{curl_fetch_memory}.
#' @param fail callback function called on failed request. Argument contains
#' error message.
#' @param data callback function, file path, or connection object for receiving
#' data. The signature for the callback function is \code{write(data, final = FALSE)}.
#' If set to \code{NULL} the entire response content gets buffered internally
#' and returned by the \code{done} callback.
#' @param data (advanced) callback function, file path, or connection object for writing
#' incoming data. This callback should only be used for \emph{streaming} applications,
#' where small pieces of incoming data get written before the request has completed. The
#' signature for the callback function is \code{write(data, final = FALSE)}. If set
#' to \code{NULL} the entire response gets buffered internally and returned by in
#' the \code{done} callback (which is usually what you want).
#' @param pool a multi handle created by \link{new_pool}. Default uses a global pool.
#' @export
#' @examples
Expand Down
9 changes: 3 additions & 6 deletions bugs/multi-stress.R
Expand Up @@ -2,14 +2,11 @@

library(curl)
pool <- new_pool()
tlds <- Filter(function(x){nchar(x) < 3}, urltools::tld_dataset)


while(TRUE){
server <- paste0('https://www.google.', sample(tlds, 1))
cat("Adding: ", server, "\n")
for(i in 1:100){
curl::curl_fetch_multi(server, pool = pool)
for(i in 1:500){
tmp <- file.path(tempdir(), sprintf("file%d.html", i))
curl::curl_fetch_multi('https://cloud.r-project.org', pool = pool, data = tmp)
}
cat("Running...\n")
print(multi_run(pool = pool))
Expand Down
10 changes: 6 additions & 4 deletions man/curl_fetch.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/handle.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/handle_cookies.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions man/multi.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/multipart.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a75f8ba

Please sign in to comment.