From: 이형주/MDE Lab(SR)/삼성전자 Date: Wed, 18 Jan 2023 23:51:16 +0000 (+0900) Subject: Remove preload thread (#456) X-Git-Tag: accepted/tizen/7.0/unified/20230119.134111^0 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fdotnet%2Flauncher.git;a=commitdiff_plain;h=7164c57cd4e43f7bbc32e1f83a5955698712b4d0 Remove preload thread (#456) --- diff --git a/NativeLauncher/launcher/lib/core_runtime.cc b/NativeLauncher/launcher/lib/core_runtime.cc index fcbf7ea..88b999c 100644 --- a/NativeLauncher/launcher/lib/core_runtime.cc +++ b/NativeLauncher/launcher/lib/core_runtime.cc @@ -271,29 +271,6 @@ void preload() pluginPreload(); } -static pthread_t coreclrPreloadThreadId = 0; -static void* coreclrPreloadThread(void* arg) -{ - _INFO("CoreclrPreloadThread START\n"); - typedef void (*CoreclrPreloadDelegate)(); - CoreclrPreloadDelegate coreclrPreloadDelegate; - - int ret = createDelegate(__hostHandle, - __domainId, - "Tizen.Runtime", - "Tizen.Runtime.Preloader", - "CoreclrPreload", - (void**)&coreclrPreloadDelegate); - - if (ret < 0) { - _ERR("Failed to create delegate for Tizen.Runtime CoreclrPreload (0x%08x)", ret); - } else { - coreclrPreloadDelegate(); - } - _INFO("CoreclrPreloadThread END\n"); - pthread_exit(NULL); -} - bool initializeCoreClr(PathManager* pm, const std::string& tpa) { bool ncdbStartupHook = isNCDBStartupHookProvided(); @@ -493,12 +470,6 @@ int CoreRuntime::initialize(const char* appType, LaunchMode launchMode) return -1; } - //Preload and execute long-duration jobs - int err = pthread_create(&coreclrPreloadThreadId, NULL, coreclrPreloadThread, NULL); - if (err) { - _ERR("CoreclrPreloadThread Creation Failed: %s", strerror(err)); - } - if (launchMode == LaunchMode::loader) { // preload libraries and manage dlls for optimizing startup time preload();