public void Destroy() { //LogSys.Info("Http download destroyed"); if (ThreadState.Running == downloadMgrThread.ThreadState) { downloadMgrThread.Abort(); } if (null != downloadMgr) { downloadMgr.Destroy(); downloadMgr = null; } }
HttpDownloadManager downloadMgr = null; // 下载管理 /// <summary> /// 创建一个HttpDownLoad /// </summary> /// <param name="maxThreadNum">制定下载任务最多的执行线程数</param> public HttpDownloadNative(int maxThreadNum) { if (null == downloadMgr) { downloadMgr = new HttpDownloadManager(maxThreadNum); } //LogSys.RegisterLogImpl(new FileLog()); //LogSys.Info("HttpDownload init thread[{0}]", maxThreadNum); downloadMgrThread = new Thread(new ThreadStart(downloadMgr.DownloadCheck)); downloadMgrThread.Start(); return; }