File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -174,18 +174,20 @@ function newcommon(; print = 0) # no printing from CHOLMOD by default
174174end
175175
176176function getcommon (:: Type{Int32} )
177+ init_once ()
177178 return get! (newcommon, task_local_storage (), :cholmod_common ):: Ref{cholmod_common}
178179end
179180
180181function getcommon (:: Type{Int64} )
182+ init_once ()
181183 return get! (newcommon_l, task_local_storage (), :cholmod_common_l ):: Ref{cholmod_common}
182184end
183185
184186getcommon () = getcommon (Int)
185187
186188const BUILD_VERSION = VersionNumber (CHOLMOD_MAIN_VERSION, CHOLMOD_SUB_VERSION, CHOLMOD_SUBSUB_VERSION)
187189
188- function __init__ ()
190+ const init_once = Base . OncePerProcess {Nothing} () do
189191 try
190192 # ## Check if the linked library is compatible with the Julia code
191193 if Libdl. dlsym_e (Libdl. dlopen (" libcholmod" ), :cholmod_version ) != C_NULL
You can’t perform that action at this time.
0 commit comments