We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dbd6ca6 commit 73b076eCopy full SHA for 73b076e
R/hooks.R
@@ -22,15 +22,19 @@ mallocDllInfo <- NULL
22
}
23
24
25
- # load the package library
26
- library.dynam("RcppParallel", pkgname, libname)
27
-
+ # load the package library if TBB library is found
+ if (!is.null(dllInfo) | !is.null(mallocDllInfo)) {
+ library.dynam("RcppParallel", pkgname, libname)
28
+ } else {
29
+ warning("Please install TBB library and reload the package!")
30
+ }
31
32
33
.onUnload <- function(libpath) {
34
35
# unload the package library
- library.dynam.unload("RcppParallel", libpath)
36
+ if (!is.null(dllInfo) | !is.null(mallocDllInfo))
37
+ library.dynam.unload("RcppParallel", libpath)
38
39
# unload tbb if we loaded it
40
if (!is.null(dllInfo))
0 commit comments