public static bool Initialize(string installPath) { while (initializing) { Thread.Sleep(1); } if (status == MecabInitStatus.NOT_INITIALIZED) { if (InitializeInt(installPath)) { status = MecabInitStatus.SUCCESS; return(true); } else { status = MecabInitStatus.FAILURE; Deinitialize(); return(false); } } else { return(status == MecabInitStatus.SUCCESS); } }
public static bool Initialize(string installPath) { while (initializing) Thread.Sleep(1); if (status == MecabInitStatus.NOT_INITIALIZED) { if (InitializeInt(installPath)) { status = MecabInitStatus.SUCCESS; return true; } else { status = MecabInitStatus.FAILURE; Deinitialize(); return false; } } else { return status == MecabInitStatus.SUCCESS; } }