Project Name File Name Usage Source Code Link
soundfingerprinting WinFFMpegResampler.cs new Thread(ProcessFiles) Link To Source File
Hermod TCPServer.cs new Thread(() => { Thread.CurrentThread.Name = "TCPServer thread"; Thread.CurrentThread.Priority = ThreadPriority.AboveNormal; Thread.CurrentThread.IsBackground = true; Listen(); }) Link To Source File
Hermod UDPServer.cs new Thread(() => { Thread.CurrentThread.Name = "UDPServer thread"; Thread.CurrentThread.Priority = ThreadPriority.AboveNormal; Thread.CurrentThread.IsBackground = true; Listen(); }) Link To Source File
NetworkMonitor FMain.cs new Thread(scan) Link To Source File
NetworkMonitor FScan.cs new Thread(scan) Link To Source File
NetworkMonitor FMain.cs new Thread(task.scan) Link To Source File
RunJS ScriptRunner.cs new Thread(JsRunner) Link To Source File
MangaEplision Global.cs new Thread(() => { NotificationWindow nw = new NotificationWindow(); nw.Show(Message, Title, Duration); nw.Closed += (sender, e) => nw.Dispatcher.InvokeShutdown(); Dispatcher.Run(); nw.Closed -= (sender, e) => nw.Dispatcher.InvokeShutdown(); }) Link To Source File
RazorEngine TemplateServiceTestFixture.cs new Thread(() => { var model = new Person { Age = index }; string expected = "

Hello you are " + index + "

"; string result = service.Parse(template, model); Assert.That(result == expected, "Result does not match expected: " + result); })
Link To Source File
lucene.net SupportClass.cs new System.Threading.Thread(new System.Threading.ThreadStart(Run)) Link To Source File
lucene.net SupportClass.cs new System.Threading.Thread(new System.Threading.ThreadStart(Run)) Link To Source File
lucene.net SupportClass.cs new System.Threading.Thread(Start) Link To Source File
lucene.net SupportClass.cs new System.Threading.Thread(Start) Link To Source File
lucene.net TestSpellChecker.cs new Thread(run) Link To Source File
lucene.net TestSupportClass.cs new Thread(fxn) Link To Source File
Xen-Game-Client Game.cs new Thread(delegate() { terrainManager.ForEachCell((cellPos, cell) => { // do each cell in its own thread var t = Task.Factory.StartNew(() => { // generate perlin 3d noise Vector3 noiseOffset = cellPos; noiseOffset.Y *= -1; cell.PerlinNoise(noiseOffset * terrainManager.cellDimensions.X, terrainNoiseDensity, seed); TerrainCellMesh mesh = new TerrainCellMesh(cell, cellPos, terrainManager.cellGap); mesh.Calculate(terrainManager.cubicTerrain); if (mesh == null) { throw new Exception("Problem generating mesh from volume!"); } // calculate convex hull mesh.CalculatePhysicsHull(); // add mesh's convex hull to the physics sim world.AddBody(mesh.RigidBody); lock (terrainLock) { terrainManager.terrainCellMeshes[(int)cellPos.X, (int)cellPos.Y, (int)cellPos.Z] = mesh; if (mesh.Vertices != null) terrainManager.vertexCount += mesh.Vertices.Count; terrainManager.cellsInitialized++; } //drawToRenderTarget.Add(new DrawRotated(terrainManager.terrainCellMeshes[(int)pos.X, (int)pos.Y, (int)pos.Z])); }); }); // for each cell, create overlapping data with // neighboring cells so we can avoid ugly border seams // then, generate a mesh for each cell /* cell.ForEach(innerPos => { if ((cellPos.X != 0) && (innerPos.X == 0)) { // get neighbor cell border density VolumeDensity8 neighborCell = terrainManager.GetCell(cellPos.X - 1, cellPos.Y, cellPos.Z); byte density = neighborCell.getVoxelAt(cell.getWidth(), innerPos.Y, innerPos.Z).getDensity(); //byte density2 = cell.getVoxelAt(innerPos).getDensity(); //density = (byte)((density + density2) / 2); // set current cell border to match cell.setDensityAt(innerPos.X - 1, innerPos.Y, innerPos.Z, density); } if ((cellPos.X != terrainManager.terrainDimensions.X) && (innerPos.X == cell.getWidth())) { // get neighbor cell border density VolumeDensity8 neighborCell = terrainManager.GetCell(cellPos.X + 1, cellPos.Y, cellPos.Z); byte density = neighborCell.getVoxelAt(0, innerPos.Y, innerPos.Z).getDensity(); //byte density2 = cell.getVoxelAt(innerPos).getDensity(); //density = (byte)((density + density2) / 2); // set current cell border to match cell.setDensityAt(innerPos.X + 1, innerPos.Y, innerPos.Z, density); } if ((cellPos.Y != 0) && (innerPos.Y == 0)) { // get neighbor cell border density VolumeDensity8 neighborCell = terrainManager.GetCell(cellPos.X, cellPos.Y - 1, cellPos.Z); byte density = neighborCell.getVoxelAt(innerPos.X, cell.getHeight(), innerPos.Z).getDensity(); //byte density2 = cell.getVoxelAt(innerPos).getDensity(); //density = (byte)((density + density2) / 2); // set current cell border to match cell.setDensityAt(innerPos.X, innerPos.Y - 1, innerPos.Z, density); } if ((cellPos.Y != terrainManager.terrainDimensions.Y) && (innerPos.Y == cell.getHeight())) { // get neighbor cell border density VolumeDensity8 neighborCell = terrainManager.GetCell(cellPos.X, cellPos.Y + 1, cellPos.Z); byte density = neighborCell.getVoxelAt(innerPos.X, 0, innerPos.Z).getDensity(); //byte density2 = cell.getVoxelAt(innerPos).getDensity(); //density = (byte)((density + density2) / 2); // set current cell border to match cell.setDensityAt(innerPos.X, innerPos.Y + 1, innerPos.Z, density); } if ((cellPos.Z != 0) && (innerPos.Z == 0)) { // get neighbor cell border density VolumeDensity8 neighborCell = terrainManager.GetCell(cellPos.X, cellPos.Y, cellPos.Z - 1); byte density = neighborCell.getVoxelAt(innerPos.X, innerPos.Y, cell.getDepth()).getDensity(); //byte density2 = cell.getVoxelAt(innerPos).getDensity(); //density = (byte)((density + density2) / 2); // set current cell border to match cell.setDensityAt(innerPos.X, innerPos.Y, innerPos.Z - 1, density); } if ((cellPos.Z != terrainManager.terrainDimensions.Z) && (innerPos.Z == cell.getDepth())) { // get neighbor cell border density VolumeDensity8 neighborCell = terrainManager.GetCell(cellPos.X, cellPos.Y, cellPos.Z + 1); byte density = neighborCell.getVoxelAt(innerPos.X, innerPos.Y, 0).getDensity(); //byte density2 = cell.getVoxelAt(innerPos).getDensity(); //density = (byte)((density + density2) / 2); // set current cell border to match cell.setDensityAt(innerPos.X, innerPos.Y, innerPos.Z + 1, density); } });*/ }) Link To Source File
nCQRS TransactionalSqlPersistenceEngineTests.cs new Thread(() => { using (var nestedUow = uowFactory.CreateUnitOfWork(Guid.NewGuid())) { note2 = (Note) nestedUow.GetById(typeof (Note), note2Id, null); note2.ChangeText("Text 2 Modified from mested UoW"); nestedUow.Accept(); } }) Link To Source File
Super2013 TransactionalSqlPersistenceEngineTests.cs new Thread(() => { using (var nestedUow = uowFactory.CreateUnitOfWork(Guid.NewGuid())) { note2 = (Note) nestedUow.GetById(typeof (Note), note2Id, null); note2.ChangeText("Text 2 Modified from mested UoW"); nestedUow.Accept(); } }) Link To Source File
starboard-sc2 ScoreboardNetwork.cs new Thread( new ThreadStart( delegate { while (this.StopListen == false) { var inBuffer = new byte[1000]; EndPoint senderRemote = new IPEndPoint(IPAddress.Any, 0); try { socket.ReceiveFrom(inBuffer, ref senderRemote); } catch (SocketException ex) { int errorCode = ex.ErrorCode; continue; } var packet = ScoreboardPacket.Parse(inBuffer); foreach (var cmd in packet.Commands) { if (cmd.Command == CommandType.Ping) { var pongCmd = new EmptyPacketCommand { Command = CommandType.Pong }; var pongPacket = new ScoreboardPacket() { Commands = new[] { pongCmd } }; socket.SendTo(pongPacket.ToBytes(), senderRemote); } } this.dispatcher.BeginInvoke((Action)(() => sb.HandleRemoteCommands(packet, socket, senderRemote))); } socket.Close(); socket.Dispose(); })) Link To Source File
SystemWrapper ThreadWrap.cs new global::System.Threading.Thread(start) Link To Source File
ASP.NET-Mvc-3 CultureUtilTest.cs new Thread(() => { }) Link To Source File
Kinect PowerpointOverlayViewModelBase.cs new Thread(SimulateMouse) Link To Source File
Kinect PowerpointOverlayViewModelBase.cs new Thread(SimulateLaser) Link To Source File
Kinect MyKinect.cs new Thread(start) Link To Source File
mono-reactive NewThreadScheduler.cs new Thread (t) Link To Source File
NDistribUnit AgentTestRunner.cs new Thread(()=> exceptionCatcher.Run(runTest)) Link To Source File
NDistribUnit GeneralProgram.cs new Thread(() => exceptionCatcher.Run( () => { string line; do { try { line = ReadLineNonBlocking(); } catch(ThreadAbortException) { return; } } while (line == null || !line.Equals("exit", StringComparison.OrdinalIgnoreCase)); returnCodeAccessMutex.WaitOne(); if (returnCode == null) { returnCode = 0; returnSemaphore.Release(); } returnCodeAccessMutex.ReleaseMutex(); })) Link To Source File
NDistribUnit DomainManager.cs new Thread(new ThreadStart(UnloadOnThread)) Link To Source File
NDistribUnit EventPump.cs new Thread( new ThreadStart( PumpThreadProc ) ) Link To Source File
NDistribUnit TestRunnerThread.cs new Thread( new ThreadStart( TestRunnerThreadProc ) ) Link To Source File
NDistribUnit TestThread.cs new Thread(new ThreadStart(RunTestProc)) Link To Source File
NDistribUnit EventQueueTests.cs new Thread(new ThreadStart(this.ConsumerThreadWrapper)) Link To Source File
NDistribUnit EventQueueTests.cs new Thread(new ThreadStart(this.Produce)) Link To Source File
NDistribUnit AfterConstraintTests.cs new Thread( SetValueTrueDelegate ) Link To Source File
NDistribUnit AfterTests.cs new Thread(ModifyValuesAfterDelay) Link To Source File
NDistribUnit PNUnitTestRunner.cs new Thread(new ThreadStart(ThreadProc)) Link To Source File
NDistribUnit Runner.cs new Thread(new ThreadStart(ThreadProc)) Link To Source File
NDistribUnit UnhandledExceptions.cs new System.Threading.Thread(new System.Threading.ThreadStart(Normal)) Link To Source File
NDistribUnit UnhandledExceptions.cs new System.Threading.Thread(new System.Threading.ThreadStart(Normal)) Link To Source File
NDistribUnit UnhandledExceptions.cs new System.Threading.Thread(new System.Threading.ThreadStart(Normal)) Link To Source File
NDistribUnit UnhandledExceptions.cs new System.Threading.Thread(new System.Threading.ThreadStart(ThreadedAssertProc)) Link To Source File
practice TasksTest.cs new Thread(() => { var request = WebRequest.CreateHttp(UrlToTest); request.Method = "GET"; var requestTask = Task.Factory.FromAsync(request.BeginGetResponse, request.EndGetResponse, null); requestTask.Wait(); var response = requestTask.Result; Assert.IsNotNull(response); this.EnqueueTestComplete(); }) Link To Source File
practice TasksTest.cs new Thread(() => { Thread.Sleep(2000); if (callback != null) { var result = a + b; callback(result); } }) Link To Source File
sable-fx EditorAdapter.cs new Thread(ColorizerLoop) Link To Source File
sable-fx EditorAdapter.cs new Thread(ParserLoop) Link To Source File
sable-fx ExampleBrowser.cs new Thread((ThreadStart)delegate { try { main.Invoke(null, null); } catch (TargetInvocationException expt) { string ex_info; if (expt.InnerException != null) ex_info = expt.InnerException.ToString(); else ex_info = expt.ToString(); MessageBox.Show(ex_info, "An OpenTK example encountered an error.", MessageBoxButtons.OK, MessageBoxIcon.Warning); Debug.Print(expt.ToString()); } catch (NullReferenceException expt) { MessageBox.Show(expt.ToString(), "The Example launcher failed to load the example.", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }) Link To Source File
sable-fx GameWindowThreaded.cs new Thread(RenderLoop) Link To Source File
sable-fx InputFileLoader.cs new Thread(DumpStream(proc.StandardError, stderr)) Link To Source File
sable-fx InputFileLoader.cs new Thread(DumpStream(proc.StandardOutput, stderr)) Link To Source File
BCCL CustomThreadPool.cs new Thread(new ThreadStart(WorkerThreadLoop)) Link To Source File
BCCL ThreadController.cs new Thread(new ThreadStart(RunTask)) Link To Source File
BCCL ThreadController.cs new Thread(new ThreadStart(RunTask)) Link To Source File
BCCL StaticRandomTest.cs new Thread(new ThreadStart(new RandomGrabber(Size, false).GrabNumbers)) Link To Source File
BCCL StaticRandomTest.cs new Thread(() => { Random rng = new Random(); for (int x=0; x < Size; x++) { rng.Next(100000); } }) Link To Source File
BCCL StaticRandomTest.cs new Thread(new ThreadStart(grabbers[i].GrabNumbers)) Link To Source File
BCCL OrderedLockTest.cs new Thread(new ThreadStart(LockSubject)) Link To Source File
BCCL SyncLockTest.cs new Thread(new ThreadStart(LockSubject)) Link To Source File
WCFQuickSamples Program.cs new Thread(new ThreadStart(delegate { string address = baseAddress + (useGet ? "/Add?x=3&y=9" : "/Echo"); HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(address); req.Method = useGet ? "GET" : "POST"; if (!useGet) { req.ContentType = "application/json"; byte[] reqBody = Encoding.UTF8.GetBytes("/"Hello world/""); Stream reqStream = req.GetRequestStream(); reqStream.Write(reqBody, 0, reqBody.Length); reqStream.Close(); } HttpWebResponse resp; try { resp = (HttpWebResponse)req.GetResponse(); } catch (WebException ex) { resp = ex.Response as HttpWebResponse; } if (resp == null) { Console.WriteLine("Response is null"); } else { Console.WriteLine("HTTP/{0} {1} {2}", resp.ProtocolVersion, (int)resp.StatusCode, resp.StatusDescription); resp.Close(); } })) Link To Source File
WCFQuickSamples Program.cs new Thread(CallService) Link To Source File
WCFQuickSamples Program.cs new Thread(CallService) Link To Source File
WCFQuickSamples Program.cs new Thread(new ThreadStart(StartServer)) Link To Source File
babelim AmipNowPlayingListerner.cs new Thread(new ThreadStart(Listen)) Link To Source File
Castle.Transactions MSDN_Is_Wrong.cs new Thread(() => { try { // modifies the file using (var fs = File.OpenWrite("abb")) { Console.WriteLine("t2 start"); Console.Out.Flush(); t2_started.Set(); // before the transacted thread does Console.WriteLine("t2 wait for t1 to start"); Console.Out.Flush(); t1_started.WaitOne(); fs.Write(new byte[] { 0x1 }, 0, 1); fs.Close(); } } catch (Exception ee) { e = ee; } finally { Console.WriteLine("t2 finally"); Console.Out.Flush(); t2_started.Set(); } }) Link To Source File
Castle.Windsor-READONLY SynchronizeViaAttributeTestCase.cs new Thread(() => { try { run(); } catch (Exception e) { uncaughtException = e; } Application.DoEvents(); Application.Exit(); }) Link To Source File
Castle.Windsor-READONLY ScopedLifestyleExplicitAndMultipleThreadsTestCase.cs new Thread(() => { Assert.AreNotEqual(Thread.CurrentThread.ManagedThreadId, initialThreadId); instanceFromOtherThread = Container.Resolve(); @event.Set(); }) Link To Source File
Castle.Windsor-READONLY DispatcherObjectTestCase.cs new Thread(() => { try { run(); } catch (Exception e) { uncaughtException = e; } application.Dispatcher.Invoke(DispatcherPriority.Background, new ThreadStart(delegate { })); application.Dispatcher.Invoke(new Action(() => application.Shutdown())); }) Link To Source File
Castle.Windsor-READONLY SynchronizeFacilityTestCase.cs new Thread(() => { try { run(); } catch (Exception e) { uncaughtException = e; } Application.DoEvents(); Application.Exit(); }) Link To Source File
Castle.Windsor-READONLY LitestylePerThreadTestCase.cs new Thread(() => { action.Invoke(); @event.Set(); }) Link To Source File
Castle.Windsor-READONLY LifestyleManagerTestCase.cs new Thread(OtherThread) Link To Source File
Castle.Windsor-READONLY MultithreadedPooledTestCase.cs new Thread(ExecuteMethodUntilSignal) Link To Source File
Castle.Windsor-READONLY SynchronizationProblemTestCase.cs new Thread(ExecuteMethodUntilSignal) Link To Source File
Castle.Windsor-READONLY InterceptorsTestCase.cs new Thread(ExecuteMethodUntilSignal) Link To Source File
Windsor SessionStoreTestCase.cs new Thread(FindCompatibleSessionOnOtherThread) Link To Source File
Windsor SessionStoreTestCase.cs new Thread(FindCompatibleStatelessSessionOnOtherThread) Link To Source File
Windsor ServiceHostFixture.cs new System.Threading.Thread(() => { int refValue = 0, outValue; Assert.AreEqual(42, client.GetValueFromConstructorAsRefAndOut(ref refValue, out outValue)); //var result = client.BeginGetValueFromConstructorAsRefAndOut(ref refValue, null, null); //Assert.AreEqual(42, client.EndGetValueFromConstructorAsRefAndOut(ref refValue, out outValue, result)); }) Link To Source File
Windsor SynchronizeViaAttributeTestCase.cs new Thread(() => { try { run(); } catch (Exception e) { uncaughtException = e; } Application.DoEvents(); Application.Exit(); }) Link To Source File
Windsor ScopedLifestyleExplicitAndMultipleThreadsTestCase.cs new Thread(() => { Assert.AreNotEqual(Thread.CurrentThread.ManagedThreadId, initialThreadId); instanceFromOtherThread = Container.Resolve(); @event.Set(); }) Link To Source File
Windsor DispatcherObjectTestCase.cs new Thread(() => { try { run(); } catch (Exception e) { uncaughtException = e; } application.Dispatcher.Invoke(DispatcherPriority.Background, new ThreadStart(delegate { })); application.Dispatcher.Invoke(new Action(() => application.Shutdown())); }) Link To Source File
Windsor SynchronizeFacilityTestCase.cs new Thread(() => { try { run(); } catch (Exception e) { uncaughtException = e; } Application.DoEvents(); Application.Exit(); }) Link To Source File
Windsor LitestylePerThreadTestCase.cs new Thread(() => { action.Invoke(); @event.Set(); }) Link To Source File
Windsor LifestyleManagerTestCase.cs new Thread(OtherThread) Link To Source File
Windsor MultithreadedPooledTestCase.cs new Thread(ExecuteMethodUntilSignal) Link To Source File
Windsor SynchronizationProblemTestCase.cs new Thread(ExecuteMethodUntilSignal) Link To Source File
Windsor InterceptorsTestCase.cs new Thread(ExecuteMethodUntilSignal) Link To Source File
sider IocpExecutor.cs new Thread(writeThread) Link To Source File
sider IocpExecutor.cs new Thread(readThread) Link To Source File
sider AutoActivatingPool.cs new Thread(() => waitingThread(context)) Link To Source File
sider HighLoadSample.cs new Thread(_ => { Thread.CurrentThread.Priority = ThreadPriority.BelowNormal; var hitCounter = 0; var client = pool.GetClient(); var rand = new Random(); while (hitCounter < ClientLifetime) { Thread.Sleep(HitDelay); // simulate idle clients if (rand.NextDouble() < IdleClientProb) { Thread.Sleep(IdleClientTime); continue; } // simulate dying clients if (rand.NextDouble() < DyingSimProb) break; var key = getRandomKey(); var value = getRandomValue(); try { client.Set(key, value); Trace.Assert(client.Get(key) == value); client.Del(key); } catch (Exception ex) { logException(ex); } hitCounter++; } // self-restart; _threads.Remove(t.ManagedThreadId); newThread(pool).Start(); }) Link To Source File
sider MultiExecSample.cs new Thread(logger) Link To Source File
sider MultiExecSample.cs new Thread(incrementor) Link To Source File
c-raft RegionFile.cs new Thread(new ThreadStart(() => { int sector = 0; lock (sectors) for (int i = 0; i < 1024; i++) { sector = EndiannessConverter.ToInt32(sectors[i]); region.offsets[i] = new McrOffset() { SectorSize = (byte)(sector & 0xFF), SectorOffset = sector >> 8, }; } sectors = null; })) Link To Source File
c-raft RegionFile.cs new Thread(new ThreadStart(() => { #if DEBUG DateTime start = DateTime.Now; #endif int offset = index * (1024 / MaxTHREADS); MemoryStream mmStream = null; for (int n = 0; n < chunkWorkerBuffer.Length; n++) { byte[] chunk = chunkWorkerBuffer[n]; if (chunk == null) continue; mmStream = new MemoryStream(chunk); region.chunks[n + offset] = NBTFile.OpenFile(mmStream, 2); mmStream.Dispose(); } chunkWorkerBuffer = null; #if DEBUG Console.WriteLine("Thread worker " + (index + 1) + " is complete! Took " + (int)(DateTime.Now - start).TotalMilliseconds + "ms to process."); })) Link To Source File
c-raft IrcClient.cs new Thread(Run) Link To Source File
c-raft Server.cs new Thread(PlayerListProc) Link To Source File
c-raft TestClient.cs new Thread(ProcessReadQueue) Link To Source File
Fibrous BoundedQueueTests.cs new Thread(queue.Run) Link To Source File
showveoservice HandbrakeEncoder.cs new Thread(() => { var process = new Process(); process.StartInfo.FileName = @"c:/Code/showveoservice/ShowveoService.MVCApplication/Resources/HandbrakeCLI.exe"; process.StartInfo.Arguments = command; process.StartInfo.RedirectStandardOutput = true; process.StartInfo.UseShellExecute = false; process.OutputDataReceived += (sender, args) => OnDataReceived(progress, task, args); process.ErrorDataReceived += (sender, args) => OnErrorReceived(args); process.Exited += (sender, args) => complete.Invoke(task); process.Start(); process.BeginOutputReadLine(); while (!process.HasExited) {} }) Link To Source File
Kinect-Annotation-and-Evaluation-Tool OpenNILiveStreamController.cs new Thread(ReaderThread) Link To Source File
Kinect-Annotation-and-Evaluation-Tool OpenNIRecordingController.cs new Thread(ReaderThread) Link To Source File
LoconetToolbox LocoNetState.IdleDetection.cs new Thread(DetectIdle) Link To Source File
LoconetToolbox LocoBuffer.ReceiveProcessor.cs new Thread(OnRun) Link To Source File
LoconetToolbox AsyncLocoBuffer.cs new Thread(Run) Link To Source File
coapp Transaction.cs new Thread(this.WaitForOwnerChange) Link To Source File
_toolkit_deprecated Transaction.cs new Thread(this.WaitForOwnerChange) Link To Source File
Samurai BackgroundJobs.cs new Thread(PerformJobs) Link To Source File
TweetAndPub Session.cs new Thread(Listen) Link To Source File
TweetAndPub Session.cs new Thread(Listen) Link To Source File
TweetAndPub Session.cs new Thread(Listen) Link To Source File
TweetAndPub BaseXClient.cs new Thread(Listen) Link To Source File
BoC BaseThreadedBackgroundTask.cs new Thread(DoWork) Link To Source File
BoC Db4oUnitOfWorkFixture.cs new Thread(() => { unitOfWork1 = BoC.UnitOfWork.UnitOfWork.BeginUnitOfWork() as Db4oUnitOfWork; session1 = unitOfWork1.Session; }) Link To Source File
BoC Db4oUnitOfWorkFixture.cs new Thread(() => { unitOfWork2 = BoC.UnitOfWork.UnitOfWork.BeginUnitOfWork() as Db4oUnitOfWork; session2 = unitOfWork2.Session; }) Link To Source File
BoC Db4oUnitOfWorkFixture.cs new Thread(() => { unitOfWork3 = BoC.UnitOfWork.UnitOfWork.BeginUnitOfWork() as Db4oUnitOfWork; session3 = unitOfWork3.Session; }) Link To Source File
EasyNMS NmsConnectionPool.cs new Thread(new ThreadStart(this.InnerStart)) Link To Source File
EasyNMS NmsConnectionPool.cs new Thread(new ThreadStart(this.InnerStart)) Link To Source File
EasyNMS NmsConnectionPool.cs new Thread(new ThreadStart(this.InnerStart)) Link To Source File
EasyNMS NmsConnectionPool.cs //this.NewConnection(); new Thread(new ThreadStart(this.VoidNewConnection)) Link To Source File
EasyNMS NmsConnectionPool.cs new Thread(new ThreadStart(this.VoidNewConnection)) Link To Source File
ConcurrentList Program.cs new Thread(start) Link To Source File
ConcurrentList CrazyParallel.cs new Thread(loop) Link To Source File
ConcurrentList CrazyParallel.cs new Thread(() => { Interlocked.Increment(ref _threadCounter); Thread.Sleep(100); action(local); if (_threadCounter > _maxThreads) Interlocked.CompareExchange(ref _maxThreads, _threadCounter, _maxThreads); Interlocked.Decrement(ref _threadCounter); }) Link To Source File
ConcurrentList CrazyParallel.cs new Thread(() => { Interlocked.Increment(ref _threadCounter); Thread.Sleep(100); action(local); if (_threadCounter > _maxThreads) Interlocked.CompareExchange(ref _maxThreads, _threadCounter, _maxThreads); Interlocked.Decrement(ref _threadCounter); }) Link To Source File
Plywood PlywoodPullService.cs new System.Threading.Thread(new System.Threading.ThreadStart(ThreadProc)) Link To Source File
localtunnel-net-client TestServer.cs new Thread(new ThreadStart(ServerTestThreadProc)) Link To Source File
localtunnel-net-client TestServer.cs new Thread(new ThreadStart(ClientTestThreadProc)) Link To Source File
fubumvc InProcessApplicationUnderTest.cs new Thread(o => { _listener = new Listener(settings.Port); _listener.Start(runtime, () => reset.Set()); }) Link To Source File
fubumvc JasmineRunner.cs new Thread(threadStart) Link To Source File
Monator RawGatheringRequestModule.cs new Thread(Start) Link To Source File
Monator RequestModule.cs new Thread(Start) Link To Source File
MaximusParserX frmSniffList.cs new System.Threading.Thread(new System.Threading.ThreadStart(UpdateViewerInternal)) Link To Source File
sbc Form1.cs new Thread(ts) Link To Source File
sbc Program.cs new Thread(new ThreadStart(() => { _client.NotifyNestVerschickt(nest); Work(); })) Link To Source File
sbc Program.cs new Thread(new ThreadStart(() => { _client.AddBemaltesEi(ei); Work(); })) Link To Source File
sbc Program.cs new Thread(new ThreadStart(() => { _client.AddNest(nest); Work(); })) Link To Source File
sbc Form1.cs new Thread(ts) Link To Source File
Memoizer.NET TwoPhaseExecutor.cs new Thread(GetPhasedAction) Link To Source File
Tempest ClientBase.cs new Thread (InlineMessageRunner) Link To Source File
Tempest ClientBase.cs new Thread (AsyncMessageRunner) Link To Source File
Tempest ClientTests.cs new Thread (() => { MockMessage m = new MockMessage { Content = "asdf" }; for (int i = 0; i < 10000 && send; ++i) connection.Receive (new MessageEventArgs (connection, m)); }) Link To Source File
Tempest ConnectionProviderTests.cs new Thread (() => { try { for (int i = 0; i < messages; ++i) { if (i > Int32.MaxValue) System.Diagnostics.Debugger.Break(); if (!e.Connection.IsConnected) return; e.Connection.Send (new MockMessage { Content = i.ToString() }); } } catch (Exception ex) { test.FailWith (ex); } }) Link To Source File
Tempest ConnectionProviderTests.cs new Thread (() => { try { for (int i = 0; i < messages; ++i) { if (i > Int32.MaxValue) System.Diagnostics.Debugger.Break(); if (!e.Connection.IsConnected) return; e.Connection.Send (new AuthenticatedAndEncryptedMessage { Number = i, Message = i.ToString() }); } } catch (Exception ex) { test.FailWith (ex); } }) Link To Source File
Tempest ConnectionProviderTests.cs new Thread (() => { try { var r = new Random (42); for (int i = 0; i < messages; ++i) { if (i > Int32.MaxValue) System.Diagnostics.Debugger.Break(); if (!e.Connection.IsConnected) return; e.Connection.Send (new AuthenticatedMessage { Number = i, Message = GetLongString (r.Next(7500, 100000)) }); } } catch (Exception ex) { test.FailWith (ex); } }) Link To Source File
Tempest ConnectionProviderTests.cs new Thread (() => { try { var r = new Random (42); for (int i = 0; i < messages; ++i) { if (i > Int32.MaxValue) System.Diagnostics.Debugger.Break(); if (!e.Connection.IsConnected) return; e.Connection.Send (new AuthenticatedTypeHeaderedMessage { Object = GetLongString (r.Next (7500, 100000)) }); } } catch (Exception ex) { test.FailWith (ex); } }) Link To Source File
Tempest ConnectionProviderTests.cs new Thread (() => { try { var r = new Random (42); for (int i = 0; i < messages; ++i) { if (i > Int32.MaxValue) System.Diagnostics.Debugger.Break(); if (!e.Connection.IsConnected) return; e.Connection.Send (new EncryptedTypeHeaderedMessage { Object = GetLongString (r.Next (7500, 100000)) }); } } catch (Exception ex) { test.FailWith (ex); } }) Link To Source File
evemu_incursion AttributesOptimizationForm.cs new Thread(new ThreadStart(Run)) Link To Source File
evemu_incursion TreeView.cs new Thread(new ThreadStart(FlashNode)) Link To Source File
evemu_incursion TreeView.cs new Thread(new ThreadStart(StartEdit)) Link To Source File
evemu_incursion Actor.cs new Thread(MessagePump) Link To Source File
Filechronization CodeRepresentative.cs new Thread(() => { try { Instance = (ICode)constructor.Invoke(parameters); } catch (ThreadAbortException) { LoggingService.Trace.Information("Creation of code: " + details.ToString() + " was aborted due to timeout", new string[] {"CODE"}, this); } }) Link To Source File
Filechronization ControllableCodeRepresentative.cs new Thread(() => { try { base.Create(); createIndicator.Release(); startBlocker.Wait(); Instance.Start(); stateOfControllable = ControllableState.Stopped; LoggingService.Trace.Information("Finished execution of controllable code: " + Details.ToString(), new string[] {"CODE"}, this); } catch (ThreadAbortException) { LoggingService.Trace.Information("Execution of " + Details.ToString() + " was aborted", new string[] {"CODE"}, this); } catch (Exception e) { LoggingService.Trace.Error(e.ToString(), new string[] {"EXCEPTION"}, this); } }) Link To Source File
Filechronization QueingThread.cs new Thread(Run) Link To Source File
Filechronization NetQueue.cs new Thread(run) Link To Source File
Filechronization ConnectionManager.cs new Thread(ListenForConnections) Link To Source File
AppMetrics Tracker.cs new Thread(LoggingThreadEntry) Link To Source File
ForgeCraft-OutDatedVersion CmdFlat.cs new Thread(new ThreadStart(() => Cuboid(p, width, length, height, block))) Link To Source File
ForgeCraft-OutDatedVersion Chunker.cs new Thread(new ThreadStart(delegate { try { Parallel.For(0, Server.genThreads, delegate(int wtf) // The int is so the compiler will shut up. { GeneratorLoop(); }); } catch (NotImplementedException) { Logger.Log("Parallel.For() is not implemented, chunk generation will be single-threaded."); GeneratorLoop(); } })) Link To Source File
ForgeCraft-OutDatedVersion Chunker.cs new Thread(new ThreadStart(delegate { while (!Server.s.shuttingDown) { try { if (loadQueue.Count < 1) { Thread.Sleep(100); continue; } loadQueue.ForEach(delegate(ChunkLoadQueue clq) { if (clq.unload) { if (clq.world.chunkData.ContainsKey(new Point(clq.x, clq.z))) clq.world.UnloadChunk(clq.x, clq.z); } else { if (!clq.world.chunkData.ContainsKey(new Point(clq.x, clq.z))) clq.world.LoadChunk(clq.x, clq.z, true, false); } Thread.Sleep(5); }); loadQueue.Clear(); } catch { } } })) Link To Source File
ForgeCraft-OutDatedVersion Chunker.cs new Thread(new ThreadStart(delegate { Point pt; while (!Server.s.shuttingDown) { try { if (sendQueue.Count < 1) { Thread.Sleep(100); continue; } sendQueue.ForEach(delegate(ChunkSendQueue csq) { pt = new Point(csq.x, csq.z); if (!csq.player.LoggedIn || (DateTime.Now - csq.time).TotalSeconds >= 60) { csq.sent = true; return; } if (csq.player.level.chunkData.ContainsKey(pt) && csq.player.level.chunkData[pt].generated) { //Console.WriteLine("SENT " + csq.x + "," + csq.z); csq.player.SendChunk(csq.player.level.chunkData[pt]); //csq.player.level.chunkData[pt].Update(csq.player.level, csq.player); csq.sent = true; } Thread.Sleep(5); }); sendQueue.RemoveAll(csq => csq.sent); } catch { } } })) Link To Source File
ForgeCraft-OutDatedVersion DeveloperTools.cs new Thread( new ThreadStart( delegate { using (var web = new WebClient()) { try { response = web.DownloadString(siteName); } catch (WebException) { throw new WebException(); } } if (String.IsNullOrWhiteSpace(response)) throw new Exception("Website Returned No Information"); lines = response.Split('/n'); if (lineNumber >= lines.Count()) throw new Exception( "Line number exceeds number of lines in website"); //maybe add callback feature? })) Link To Source File
ForgeCraft-OutDatedVersion DeveloperTools.cs new Thread( new ThreadStart( delegate { using (var web = new WebClient()) { try { response = web.DownloadString(siteName); } catch (WebException) { throw new WebException(); } } if (String.IsNullOrWhiteSpace(response)) throw new Exception("Website Returned No Information"); })) Link To Source File
ForgeCraft-OutDatedVersion Program.cs new Thread(new ThreadStart(InventoryDebug)) Link To Source File
ForgeCraft-OutDatedVersion Physics.cs new Thread(new ThreadStart(RunLoop)) Link To Source File
ForgeCraft-OutDatedVersion World.cs new System.Threading.Thread(new System.Threading.ThreadStart(delegate { int speed = 50, wait = speed; while (!Server.s.shuttingDown) { try { if (!timerunning) { System.Threading.Thread.Sleep(speed); continue; } if (wait > 0) System.Threading.Thread.Sleep(wait); DateTime Start = DateTime.Now; time++; if (time > 24000) { time = 0; moonPhase++; if (moonPhase > 7) moonPhase = 0; } if (TimeChanged != null) TimeChanged(); if (WorldTimeChanged != null) WorldTimeChanged(); TimeSpan Took = DateTime.Now - Start; wait = speed - (int)Took.TotalMilliseconds; } catch { wait = speed; } } })) Link To Source File
ForgeCraft-OutDatedVersion Server.cs //Get latest developerlist new Thread(new ThreadStart(UpdateDevs)) Link To Source File
ForgeCraft-OutDatedVersion Server.cs new Thread(new ThreadStart(delegate { int wait = 0, speed = 50; while (!Server.s.shuttingDown) { try { if (wait > 0) Thread.Sleep(wait); DateTime Start = DateTime.Now; Entity.EntityPhysics(); TimeSpan Took = DateTime.Now - Start; wait = speed - (int)Took.TotalMilliseconds; } catch { wait = speed; } } })) Link To Source File
ForgeCraft-OutDatedVersion Server.cs new Thread(p.Start) Link To Source File
ForgeCraft-OutDatedVersion MainLoop.cs new Thread(Loop) Link To Source File
ForgeCraft-OutDatedVersion Player.cs new Thread(new ThreadStart(() => Poison(timespan, interval, true))) Link To Source File
ForgeCraft-OutDatedVersion CmdCheckPort.cs new Thread(new ThreadStart(delegate { try { using (WebClient WEB = new WebClient()) { response = WEB.DownloadString("http://www.mcforge.net/ports.php?port=" + port); } if (response == "open") { if (!p.IsConsole) p.SendMessage(Color.Green + "Port Open!"); else Logger.Log("Port Open!"); return; } if (response == "closed") { if (!p.IsConsole) p.SendMessage(Color.Red + "Port Closed"); else Logger.Log("Port Closed"); return; } if (!p.IsConsole) p.SendMessage(Color.Yellow + "An Error has occured"); else Logger.Log("An Error has occured"); return; } catch { if (!p.IsConsole) p.SendMessage(Color.Yellow + "An Error has occured"); else Logger.Log("An Error has occured"); return; } })) Link To Source File
MvcPerf CultureUtilTest.cs new Thread(() => { }) Link To Source File
study Form1.cs new Thread(new ThreadStart(_crawler.Crawl)) Link To Source File
Presentations What.cs new Thread(() => ReallyComplexWork(number)) Link To Source File
PugRanking IrcConnection.cs new Thread(new ThreadStart(_Worker)) Link To Source File
PugRanking IrcConnection.cs new Thread(new ThreadStart(_Worker)) Link To Source File
PugRanking IrcConnection.cs new Thread(new ThreadStart(_Worker)) Link To Source File
thingmagic Form1.cs new Thread(delegate() { reader.FirmwareLoad(firmware); reader.Destroy(); stopProgress(); label6.Invoke(new del1(updateStatus)); }) Link To Source File
thingmagic Form1.cs new Thread(ProgressBarWork) Link To Source File
thingmagic Reader.cs new Thread(DoWorkGivenRead) Link To Source File
thingmagic Reader.cs new Thread(expub.OnReadException) Link To Source File
thingmagic RqlReader.cs new Thread(ReceiverBody) Link To Source File
thingmagic RqlReader.cs new Thread(expub.OnReadException) Link To Source File
thingmagic SerialReader.cs new Thread(expub.OnReadException) Link To Source File
thingmagic SerialReader.cs new Thread(StartContinuousRead) Link To Source File
Maggie.WPF ParallelWork.cs new Thread(thread=> { var currentThread = thread as Thread; Dispatcher dispatcher = currentDispatcher; try { if (currentThread != null) Debug.WriteLine(currentThread.ManagedThreadId + " Work execution stated: " + DateTime.Now.ToString()); var result = doWork(arg, (data, message, percent) => dispatcher.BeginInvoke(progress, arg, message, percent)); if (result == null) { try { dispatcher.BeginInvoke(fail, arg, null); } catch { // Incase the error handler produces exception, we have to gracefully // handle it since this is a background thread } finally { // Nothing to do, error handler is not supposed to produce more error } } else { try { dispatcher.BeginInvoke(onComplete, arg, result); } catch (Exception x) { dispatcher.BeginInvoke(fail, arg, x); } } } catch (ThreadAbortException ex) { Debug.WriteLine(ex); } catch (Exception x) { dispatcher.BeginInvoke(fail, arg, x); } finally { currentDispatcher.Dispose(); if (currentThread != null) Debug.WriteLine(currentThread.ManagedThreadId + " Work execution completed: " + DateTime.Now.ToString()); lock (ThreadPool) { ThreadPool.Remove(thread as Thread); if (ThreadPool.Count == 0) { AllBackgroundThreadCompletedEvent.Set(); Debug.WriteLine("All Work completed: " + DateTime.Now.ToString()); } } } }) Link To Source File
ILSpy OpenFromGacDialog.xaml.cs new Thread(new ThreadStart(FetchGacContents)) Link To Source File
ILSpy SearchPane.cs new Thread(currentSearch.Run) Link To Source File
ILSpy DecompilerTextView.cs new Thread(new ThreadStart( delegate { #if DEBUG if (System.Diagnostics.Debugger.IsAttached) { try { AvalonEditTextOutput textOutput = new AvalonEditTextOutput(); textOutput.LengthLimit = outputLengthLimit; DecompileNodes(context, textOutput); textOutput.PrepareDocument(); tcs.SetResult(textOutput); } catch (AggregateException ex) { tcs.SetException(ex); } catch (OperationCanceledException ex) { tcs.SetException(ex); } } else #endif { try { AvalonEditTextOutput textOutput = new AvalonEditTextOutput(); textOutput.LengthLimit = outputLengthLimit; DecompileNodes(context, textOutput); textOutput.PrepareDocument(); tcs.SetResult(textOutput); } catch (Exception ex) { tcs.SetException(ex); } } })) Link To Source File
ILSpy DecompilerTextView.cs new Thread(new ThreadStart( delegate { try { Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); using (StreamWriter w = new StreamWriter(fileName)) { try { DecompileNodes(context, new PlainTextOutput(w)); } catch (OperationCanceledException) { w.WriteLine(); w.WriteLine("Decompiled was cancelled."); throw; } } stopwatch.Stop(); AvalonEditTextOutput output = new AvalonEditTextOutput(); output.WriteLine("Decompilation complete in " + stopwatch.Elapsed.TotalSeconds.ToString("F1") + " seconds."); output.WriteLine(); output.AddButton(null, "Open Explorer", delegate { Process.Start("explorer", "/select,/"" + fileName + "/""); }); output.WriteLine(); tcs.SetResult(output); #if DEBUG } catch (OperationCanceledException ex) { tcs.SetException(ex); } catch (AggregateException ex) { tcs.SetException(ex); #else } catch (Exception ex) { tcs.SetException(ex); #endif } })) Link To Source File
SharpDevelop ObjectCreator.cs new Thread(start) Link To Source File
SharpDevelop MainForm.cs new Thread(ParserThread) Link To Source File
SharpDevelop Profiler.cs new Thread(new ThreadStart(DataCollection)) Link To Source File
SharpDevelop Form1.cs new Thread(new ThreadStart(MyThread)) Link To Source File
SharpDevelop UnmanagedCircularBufferTest.cs new Thread(a1) Link To Source File
SharpDevelop CSharpBackgroundCompiler.cs new Thread( delegate() { LoggingService.Info("start background compiler"); worker.RunLoop(); } ) Link To Source File
SharpDevelop PythonConsoleHost.cs new Thread(RunConsole) Link To Source File
SharpDevelop RubyConsoleHost.cs new Thread(RunConsole) Link To Source File
SharpDevelop ExpressionEvaluator_Tests.cs new System.Threading.Thread( delegate() { WorkerThreadMoved = true; } ) Link To Source File
SharpDevelop ControlFlow_MainThreadExit.cs new System.Threading.Thread(WaitForALongTime) Link To Source File
SharpDevelop ConnectionWizardWindow.xaml.cs new Thread( new ThreadStart( delegate() { try { if (SelectedDatabaseDriver != null) { SetIsLoading(true); SelectedDatabaseDriver.PopulateDatasources(); } } catch (Exception ex) { Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() => { MessageBox.Show(this, ex.Message, this.Title, MessageBoxButton.OK, MessageBoxImage.Error); })); } finally { SetIsLoading(false); } } ) ) Link To Source File
SharpDevelop ConnectionWizardWindow.xaml.cs new Thread(new ThreadStart( delegate() { if (SelectedDatabaseDriver != null) { SetIsLoading(true); try { SelectedDatabaseDriver.PopulateDatabases(_selectedDatasource); } catch (Exception ex) { Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() => { MessageBox.Show(this, ex.Message, this.Title, MessageBoxButton.OK, MessageBoxImage.Error); })); } SetIsLoading(false); } })) Link To Source File
SharpDevelop DecompiledViewContent.cs new Thread(DecompilationThread) Link To Source File
SharpDevelop PackageManagementThread.cs new Thread(threadStart) Link To Source File
SharpDevelop EditorAdapter.cs new Thread(ColorizerLoop) Link To Source File
SharpDevelop EditorAdapter.cs new Thread(ParserLoop) Link To Source File
SharpDevelop HistoryViewPanel.cs new Thread(new ThreadStart(GetLogMessages)) Link To Source File
SharpDevelop AsynchronousWaitDialog.cs new Thread(Run) Link To Source File
SharpDevelop WorkerProcess.cs new Thread(ReaderThread) Link To Source File
SharpDevelop LoadSolutionProjects.cs new Thread(new ThreadStart(RunThread)) Link To Source File
SharpDevelop GacReferencePanel.cs new Thread(ResolveVersionsThread) Link To Source File
SharpDevelop FontSelectionPanel.cs new Thread(DetectMonospacedThread) Link To Source File
SharpDevelop Program.cs new Thread(RunThread) Link To Source File
SharpDevelop ExceptionBox.cs new Thread((ThreadStart)delegate { ClipboardWrapper.SetText(exceptionText); }) Link To Source File
MotionFx HandPointGenerator.cs new Thread(start) Link To Source File
NETGen NetworkDisplay.cs new Thread(new ThreadStart(new Action(delegate() { InitializeComponent(); visualizer.SetGraphics(drawPanel.CreateGraphics(), drawPanel.DisplayRectangle); this.Text = visualizer.Network.Name; drawPanel.Paint += new PaintEventHandler(drawPanel_Paint); drawPanel.MouseDown += new MouseEventHandler(drawPanel_MouseDown); drawPanel.MouseUp += new MouseEventHandler(drawPanel_MouseUp); drawPanel.MouseMove += new MouseEventHandler(drawPanel_MouseMove); drawPanel.MouseClick += new MouseEventHandler(drawPanel_MouseClick); this.MouseWheel += new MouseEventHandler(drawPanel_MouseWheel); // Add the layout options to the menu LayoutOptions.ItemAdded += new GUI.LayoutOptions.ItemAddedDelegate(LayoutOptions_ItemAdded); foreach (string name in LayoutOptions.LayoutNames) { ToolStripItem i = layoutToolStripMenuItem.DropDownItems.Add(name); i.Click += new EventHandler(i_Click); } System.Threading.Timer t = new System.Threading.Timer(timerCallbackFunction, null, 50, 1000 / fps); Application.Run(this); }))) Link To Source File
NETGen NetworkVisualizer.cs new Thread(new ThreadStart(new Action(delegate() { Instance = new NetworkVisualizer(network, layout, colorizer, width, height); _initialized.Set(); Instance.Run(80f); }))) Link To Source File
MiniTwitter-Mod TwitterClient.cs new Thread(() => { while (true) { try { DateTime time; using (var reader = new StreamReader(FetchStream(OAuthBase.HttpVerbs.Get, "https://userstream.twitter.com/2/user.json", null, out time))) { _failureCount = 0; while (!reader.EndOfStream) { var line = reader.ReadLine(); if (string.IsNullOrWhiteSpace(line)) { continue; } using (var jsonReader = JsonReaderWriterFactory.CreateJsonReader(Encoding.UTF8.GetBytes(line), XmlDictionaryReaderQuotas.Max)) { var element = XElement.Load(jsonReader); if (element.Element("delete") != null) { var status = new Status { ID = (ulong)element.Element("delete").Element("status").Element("id") }; UserStreamUpdated(this, new StatusEventArgs(status) { Action = StatusAction.Deleted }); } else if (element.Element("user") != null) { var status = new Status { ID = (ulong)element.Element("id"), CreatedAt = DateTime.ParseExact(element.Element("created_at").Value, "ddd MMM dd HH:mm:ss zzzz yyyy", System.Globalization.DateTimeFormatInfo.InvariantInfo), Text = element.Element("text").Value, Source = element.Element("source").Value, Favorited = (bool)element.Element("favorited"), Sender = new User { ID = (int)element.Element("user").Element("id"), ScreenName = element.Element("user").Element("screen_name").Value, Name = element.Element("user").Element("name").Value, ImageUrl = element.Element("user").Element("profile_image_url").Value, ImageUrlSSL = element.Element("user").Element("profile_image_url_https").Value, Description = element.Element("user").Element("description").Value, Protected = (bool)element.Element("user").Element("protected"), Location = element.Element("user").Element("location").Value, Verified = (bool)element.Element("user").Element("verified"), FavouritesCount = (int)element.Element("user").Element("favourites_count"), Followers = (int)element.Element("user").Element("followers_count"), Friends = (int)element.Element("user").Element("friends_count"), StatusesCount = (int)element.Element("user").Element("statuses_count"), }, Entities = new Entities { Urls = new Urls(), Hashtags = new HashTags(), UserMentions = new UserMentions(), }, }; //解析Entities //解析URL if (!element.Element("entities").Element("urls").Value.IsNullOrEmpty()) { status.Entities.Urls.URL= element.Element("entities").Element("urls").Elements("item").Select(url => new Url{ StartIndex = int.Parse(url.Element("indices").Elements("item").First().Value), EndIndex = int.Parse(url.Element("indices").Elements("item").Last().Value), DisplayUrl = (string)url.Element("display_url"), URL = (string)url.Element("url"), ExpandedUrl = (string)url.Element("expanded_url"), }).ToArray(); } //解析UserMention if (!element.Element("entities").Element("user_mentions").Value.IsNullOrEmpty()) { status.Entities.UserMentions.UserMention = element.Element("entities").Element("user_mentions").Elements("item").Select(url => new UserMention { StartIndex = int.Parse(url.Element("indices").Elements("item").First().Value), EndIndex = int.Parse(url.Element("indices").Elements("item").Last().Value), ID = (int)url.Element("id"), Name = (string)url.Element("name"), ScreenName = (string)url.Element("screen_name"), }).ToArray(); } //解析Hashtag if (!element.Element("entities").Element("hashtags").Value.IsNullOrEmpty()) { status.Entities.Hashtags.Hashtag = element.Element("entities").Element("hashtags").Elements("item").Select(url => new HashTag { StartIndex = int.Parse(url.Element("indices").Elements("item").First().Value), EndIndex = int.Parse(url.Element("indices").Elements("item").Last().Value), Text = (string)url.Element("text"), }).ToArray(); } if (element.Element("retweeted_status") != null) { status.ReTweetedStatus = new Status { ID = (ulong)element.Element("retweeted_status").Element("id"), CreatedAt = DateTime.ParseExact(element.Element("retweeted_status").Element("created_at").Value, "ddd MMM dd HH:mm:ss zzzz yyyy", System.Globalization.DateTimeFormatInfo.InvariantInfo), Text = element.Element("retweeted_status").Element("text").Value, Source = element.Element("retweeted_status").Element("source").Value, Favorited = (bool)element.Element("retweeted_status").Element("favorited"), Sender = new User { ID = (int)element.Element("retweeted_status").Element("user").Element("id"), ScreenName = element.Element("retweeted_status").Element("user").Element("screen_name").Value, Name = element.Element("retweeted_status").Element("user").Element("name").Value, ImageUrl = element.Element("retweeted_status").Element("user").Element("profile_image_url").Value, ImageUrlSSL = element.Element("retweeted_status").Element("user").Element("profile_image_url_https").Value, Description = element.Element("retweeted_status").Element("user").Element("description").Value, Protected = (bool)element.Element("retweeted_status").Element("user").Element("protected"), Location = element.Element("retweeted_status").Element("user").Element("location").Value, Verified = (bool)element.Element("retweeted_status").Element("user").Element("verified"), FavouritesCount = (int)element.Element("retweeted_status").Element("user").Element("favourites_count"), Followers = (int)element.Element("retweeted_status").Element("user").Element("followers_count"), Friends = (int)element.Element("retweeted_status").Element("user").Element("friends_count"), StatusesCount = (int)element.Element("retweeted_status").Element("user").Element("statuses_count"), }, }; status.ReTweetedStatus.IsAuthor = status.ReTweetedStatus.Sender.ID == LoginedUser.ID; } if (!string.IsNullOrEmpty(element.Element("in_reply_to_status_id").Value)) { status.InReplyToStatusID = (ulong)element.Element("in_reply_to_status_id"); } if (!string.IsNullOrEmpty(element.Element("in_reply_to_user_id").Value)) { status.InReplyToUserID = (int)element.Element("in_reply_to_user_id"); } status.IsAuthor = status.Sender.ID == LoginedUser.ID; status.IsMention = status.InReplyToUserID == LoginedUser.ID; AsyncDo(CacheOrUpdate, status); Status cacheItem; statusesCache.TryGetValue(status.ID, out cacheItem); cacheItem = cacheItem ?? status; if (true)//Properties.Settings.Default.GlobalFilter.Count != 0 ? Properties.Settings.Default.GlobalFilter.AsParallel().All((filter) => filter.Process(status)) : true) { UserStreamUpdated(this, new StatusEventArgs(cacheItem) { Action = StatusAction.Update }); } } else if (element.Element("event") != null) { if (element.Element("event").Value == "favorite") { var status = new Status { ID = (ulong)element.Element("target_object").Element("id"), Sender = new User { ID = (int)element.Element("source").Element("id") } }; UserStreamUpdated(this, new StatusEventArgs(status) { Action = StatusAction.Favorited }); } else if (element.Element("event").Value == "unfavorite") { var status = new Status { ID = (ulong)element.Element("target_object").Element("id"), Sender = new User { ID = (int)element.Element("source").Element("id") } }; UserStreamUpdated(this, new StatusEventArgs(status) { Action = StatusAction.Unfavorited }); } } } } } _failureCount = 1; } catch (ThreadAbortException) { return; } catch { _failureCount++; if (_failureCount > 10) { _failureCount = 10; } } finally { Thread.SpinWait(1000 * (int)Math.Pow(_failureCount, _failureCount)); } } }) Link To Source File
Pentacorn CLEyeCapture.cs new Thread(this.Runner) Link To Source File
Craig-s-Utility-Library WebPageThumbnail.cs new Thread(new ThreadStart(CreateBrowser)) Link To Source File
Craig-s-Utility-Library WebPageThumbnail.cs new Thread(new ThreadStart(CreateBrowser)) Link To Source File
strokes ThreadTest.cs new Thread(() => { }) Link To Source File
strokes ThreadTest.cs new Thread(() => { }) Link To Source File
learning Program.cs new Thread(() => { // // The grammar of messages that can be sent out is as follows: // OnNext* (OnError | OnCompleted) // // Exceptions are terminating and have immediate abort semantics (as // the CLR does in general). // while (!stop) { observer.OnNext(rand.Next()); Thread.Sleep(1000); } quit.Set(); }) Link To Source File
learning Program.cs new Thread(() => { // // The grammar of messages that can be sent out is as follows: // OnNext* (OnError | OnCompleted) // // Exceptions are terminating and have immediate abort semantics (as // the CLR does in general). // while (!stop) { observer.OnNext(rand.Next()); Thread.Sleep(1000); } quit.Set(); }) Link To Source File
Remora RemoraHostService.cs new Thread(HandleRequests) Link To Source File
CrossWord Main.cs new Thread(readMethod) Link To Source File
Mystique StreamingConnection.cs new Thread(StreamingThread) Link To Source File
Mystique UserStreamsConnection.cs new Thread(PumpTweets) Link To Source File
Mystique SupervisorScheduler.cs new Thread(SchedulerCore) Link To Source File
kayak NetTests.cs new Thread(() => scheduler.Start()) Link To Source File
kayak SchedulerTests.cs new Thread(() => scheduler.Start()) Link To Source File
kayak SocketTests.cs new Thread(() => scheduler.Start()) Link To Source File
OCTGN CassiniDevServerOP.cs new Thread(() => { string l = _serverProcess.StandardOutput.ReadLine(); while (l != null) { if (l.StartsWith("started:") || l.StartsWith("error:")) { line = l; } l = _serverProcess.StandardOutput.ReadLine(); } }) Link To Source File
OCTGN Client.cs new Thread(DoPings) Link To Source File
OCTGN Program.cs new Thread(Runner) Link To Source File
OCTGN Server.cs new Thread(CheckConnections) Link To Source File
OCTGN Server.cs new Thread(DoPing) Link To Source File
OCTGN LobbyClient.cs new Thread(() => { //TODO Need to add a method to handle 2-step signin. _onLoginFinished = onFinish; string appName = "skylabs-LobbyClient-" + Version; var s = new Service("code", appName); s.setUserCredentials(email, password); if (captcha != null && _mCaptchaToken != null) { onUpdate.Invoke("Verifying captcha"); if (!String.IsNullOrWhiteSpace(captcha) || !String.IsNullOrWhiteSpace(_mCaptchaToken)) { s.Credentials.CaptchaToken = _mCaptchaToken; s.Credentials.CaptchaAnswer = captcha; } } try { Debug.WriteLine("Querying Google..."); onUpdate.Invoke("Logging into Google..."); string ret = s.QueryClientLoginToken(); onUpdate.Invoke("Sending login token to Server..."); Debug.WriteLine("Received login token."); var sm = new SocketMessage("login"); sm.AddData("email", email); sm.AddData("token", ret); sm.AddData("status", status); WriteMessage(sm); onUpdate.Invoke("Waiting for server response..."); } catch (CaptchaRequiredException ce) { _mCaptchaToken = ce.Token; if (OnCaptchaRequired != null) OnCaptchaRequired.Invoke( "https://www.google.com/accounts/DisplayUnlockCaptcha", ce.Url); } catch (AuthenticationException re) { // var cu = (string) re.Data["CaptchaUrl"]; // unused onFinish.Invoke(LoginResult.Failure, DateTime.Now, re.Message); } catch (WebException) { onFinish.Invoke(LoginResult.Failure, DateTime.Now, "Connection problem."); } onFinish.Invoke(LoginResult.WaitingForResponse, DateTime.Now, ""); }) Link To Source File
Fracture WorkerThread.cs new Thread(() => { try { var wi = _WorkItems; var we = _WakeEvent; // If either of these fields are null, we've probably been disposed if ((wi != null) && (we != null)) _ThreadFunc(wi, we); #if !XBOX } catch (ThreadInterruptedException) { #endif } catch (ThreadAbortException) { } var me = Interlocked.Exchange(ref _Thread, null); if (me == Thread.CurrentThread) OnThreadTerminated(Thread.CurrentThread); }) Link To Source File
Fracture ParallelThreadPool.cs new System.Threading.Thread(new ThreadStart(this.ThreadFunc)) Link To Source File
Fracture WorkerThread.cs new Thread(WorkerFn) Link To Source File
Art BlockedArray.cs new Thread (delegate () { Initialize (ref data, 0, data.Length / 2); }) Link To Source File
Art BlockedArray.cs new Thread (delegate () { Initialize (ref data, data.Length / 2, data.Length / 2); }) Link To Source File
OrchardApp LockFileManagerTests.cs new Thread(PlayWithAcquire) Link To Source File
OrchardApp LockFileManagerTests.cs new Thread(PlayWithIsLocked) Link To Source File
PaulTest PerformanceBenchmarkEngine.cs new Thread(() => { for (var j = 0; j < interval; j++) { test.Run(); } }) Link To Source File
HyperCloud ConsumerFactory.cs new Thread(_ => { while (true) { if (disposed) { break; } try { BasicDeliverEventArgs deliverEventArgs; lock (sharedQueueLock) { deliverEventArgs = (BasicDeliverEventArgs)sharedQueue.Dequeue(); } if (deliverEventArgs != null) { HandleMessageDelivery(deliverEventArgs); } } catch (EndOfStreamException) { Thread.Sleep(10); } } }) Link To Source File
lokad-cloud-apphost Cell.cs new Thread(() => { var currentRoundStartTime = DateTimeOffset.UtcNow - FloodFrequencyThreshold; while (!cancellationToken.IsCancellationRequested) { var observer = _hostContext.Observer; var lastRoundStartTime = currentRoundStartTime; currentRoundStartTime = DateTimeOffset.UtcNow; var identity = _hostContext.GetNewCellLifeIdentity(_solutionName, _cellName, _deployment); AppDomain domain = AppDomain.CreateDomain("LokadCloudServiceRuntimeCell_" + identity.UniqueCellInstanceName, null, AppDomain.CurrentDomain.SetupInformation); try { try { _entryPoint = (CellAppDomainEntryPoint)domain.CreateInstanceAndUnwrap( Assembly.GetExecutingAssembly().FullName, typeof(CellAppDomainEntryPoint).FullName); } catch (Exception exception) { // Fatal Error observer.TryNotify(() => new CellFatalErrorRestartedEvent(identity, exception)); cancellationToken.WaitHandle.WaitOne(DelayWhenFlooding); continue; } // Forward cancellation token to AppDomain-internal cancellation token source var registration = cancellationToken.Register(_entryPoint.Cancel); var environment = new ApplicationEnvironment(_hostContext, identity, _deployment, _cellDefinition.Assemblies, _sendCommand); try { observer.TryNotify(() => new CellStartedEvent(identity)); _entryPoint.Run(_cellDefinition, _hostContext.DeploymentReader, environment); } catch (ThreadAbortException exception) { Thread.ResetAbort(); observer.TryNotify(() => new CellAbortedEvent(identity, exception)); } catch (Exception exception) { if (cancellationToken.IsCancellationRequested) { observer.TryNotify(() => new CellAbortedEvent(identity, exception)); } else { _entryPoint = null; if ((DateTimeOffset.UtcNow - lastRoundStartTime) < FloodFrequencyThreshold) { observer.TryNotify(() => new CellExceptionRestartedEvent(identity, exception, true)); cancellationToken.WaitHandle.WaitOne(DelayWhenFlooding); } else { observer.TryNotify(() => new CellExceptionRestartedEvent(identity, exception, false)); } } } finally { RemotingServices.Disconnect(environment); _entryPoint = null; observer.TryNotify(() => new CellStoppedEvent(identity)); registration.Dispose(); } } catch (Exception exception) { // Fatal Error observer.TryNotify(() => new CellFatalErrorRestartedEvent(identity, exception)); cancellationToken.WaitHandle.WaitOne(DelayWhenFlooding); continue; } finally { AppDomain.Unload(domain); } } }) Link To Source File
Wheezy.Pivot ITunesRemote.cs new Thread(new ThreadStart(connectAsync)) Link To Source File
SIinformer App.xaml.cs new Thread(NotifierThread) Link To Source File
Algorithms AutoResetEvent.cs new Thread(ThreadProc) Link To Source File
Algorithms AutoResetEvent.cs new Thread(ThreadProc) Link To Source File
Algorithms AutoResetEvent.cs new Thread(ThreadProc) Link To Source File
Algorithms ManualResetEvent.cs new Thread(ThreadProc) Link To Source File
Algorithms ManualResetEvent.cs new Thread(ThreadProc) Link To Source File
Algorithms ManualResetEvent.cs new Thread(ThreadProc) Link To Source File
Simple.Data InMemoryTests.cs new Thread(() => r1 = ThreadTestHelper(1)) Link To Source File
Simple.Data InMemoryTests.cs new Thread(() => r2 = ThreadTestHelper(2)) Link To Source File
Simple.Data XmlMockAdapterTest.cs new Thread(() => r1 = ThreadTestHelper(1)) Link To Source File
Simple.Data XmlMockAdapterTest.cs new Thread(() => r2 = ThreadTestHelper(2)) Link To Source File
SuperSocket AsyncSocketServer.cs new Thread(StartListen) Link To Source File
SuperSocket AsyncStreamSocketServer.cs new Thread(StartListen) Link To Source File
SuperSocket UdpSocketServerTest.cs new Thread(new ThreadStart(() => { Console.WriteLine("C: " + m_Encoding.GetString(ReceiveMessage(trySocket, serverAddress).ToArray())); })) Link To Source File
SuperSocket Program.cs new Thread(() => RunTest(i, remoteEndPoint, (r, w) => RunEcho(r, w))) Link To Source File
SuperSocket AsyncSocketServer.cs new Thread(StartListen) Link To Source File
SuperSocket SyncSocketServer.cs new Thread(StartListen) Link To Source File
SuperSocket SyncSocketServer.cs new Thread(session.Start) Link To Source File
SuperSocket AsyncSocketServer.cs new Thread(StartListen) Link To Source File
SuperSocket AsyncStreamSocketServer.cs new Thread(StartListen) Link To Source File
SuperSocket SyncSocketServer.cs new Thread(StartListen) Link To Source File
SuperSocket UdpSocketServerTest.cs new Thread(new ThreadStart(() => { Console.WriteLine("C: " + m_Encoding.GetString(ReceiveMessage(trySocket, serverAddress).ToArray())); })) Link To Source File
Schumix2 Compiler.cs new Thread(() => ReturnCode = StartCode(sIRCMessage, data, o)) Link To Source File
Schumix2 Compiler.cs new Thread(() => { o.GetType().InvokeMember(CompilerConfig.MainConstructor, BindingFlags.InvokeMethod | BindingFlags.Default, null, o, null); b = true; }) Link To Source File
Schumix2 Functions.cs new Thread(() => webTitle = WebHelper.GetWebTitle(url, sLManager.GetChannelLocalization(sIRCMessage.Channel))) Link To Source File
Schumix2 MaffiaGame.cs new Thread(Game) Link To Source File
Schumix2 GitRss.cs new Thread(Update) Link To Source File
Schumix2 GitRss.cs new Thread(Update) Link To Source File
Schumix2 HgRss.cs new Thread(Update) Link To Source File
Schumix2 HgRss.cs new Thread(Update) Link To Source File
Schumix2 MantisBTRss.cs new Thread(Update) Link To Source File
Schumix2 MantisBTRss.cs new Thread(Update) Link To Source File
Schumix2 SvnRss.cs new Thread(Update) Link To Source File
Schumix2 SvnRss.cs new Thread(Update) Link To Source File
Schumix2 WordPressRss.cs new Thread(Update) Link To Source File
Schumix2 WordPressRss.cs new Thread(Update) Link To Source File
Schumix2 Main.cs new Thread(TerminateHandler) Link To Source File
Schumix2 Build.cs new Thread(() => Compile(Version)) Link To Source File
Schumix2 Build.cs new Thread(() => Compile(Version)) Link To Source File
Schumix2 Schumix.cs new Thread(Run) Link To Source File
Schumix2 Build.cs new Thread(() => Compile(Version)) Link To Source File
Schumix2 Build.cs new Thread(() => Compile(Version)) Link To Source File
Schumix2 Network.cs new Thread(Opcodes) Link To Source File
Schumix2 Network.cs new Thread(AutoPing) Link To Source File
ForgeCraft Program.cs new Thread(new ThreadStart(receive)) Link To Source File
ForgeCraft Server.cs new Thread(new ThreadStart(p.Start)) Link To Source File
ForgeCraft MainLoop.cs new Thread(Loop) Link To Source File
CAP LoadTestThread.cs new Thread(ThreadProc) Link To Source File
CAP QueueProcessorThread.cs new Thread(ThreadProc) Link To Source File
CAP LoadTestThread.cs new Thread(ThreadProc) Link To Source File
CAP SnapshotThread.cs new Thread(ThreadProc) Link To Source File
CAP LoadTestThread.cs new Thread(ThreadProc) Link To Source File
EasyNetQ QueueingConsumerFactory.cs new Thread(_ => { while(true) { if (disposed) break; try { BasicDeliverEventArgs deliverEventArgs; lock (sharedQueueLock) { deliverEventArgs = (BasicDeliverEventArgs)sharedQueue.Dequeue(); } if(deliverEventArgs != null) { HandleMessageDelivery(deliverEventArgs); } } catch (EndOfStreamException) { // do nothing here, EOS fired when queue is closed // Looks like the connection has gone away, so wait a little while // before continuing to poll the queue Thread.Sleep(10); } } }) Link To Source File
EasyNetQ Program.cs new Thread(state => { while (!cancelled) { var text = new string('#', messageSize); var message = new TestPerformanceMessage { Text = text }; try { bus.Publish(message); Interlocked.Increment(ref messageCount); } catch (EasyNetQException easyNetQException) { Console.Out.WriteLine(easyNetQException.Message); Thread.Sleep(1000); } } }) Link To Source File
LunchCrawler LunchRestaurantAnalyzer.cs new Thread(() => { Thread.Sleep(timeoutForProcessing); cts.Cancel(); }) Link To Source File
orchard LockFileManagerTests.cs new Thread(PlayWithAcquire) Link To Source File
orchard LockFileManagerTests.cs new Thread(PlayWithIsLocked) Link To Source File
monodevelop GdbSession.cs new Thread (OutputInterpreter) Link To Source File
monodevelop DebuggerServer.cs new ST.Thread ((ST.ThreadStart)EventDispatcher) Link To Source File
monodevelop DebuggerServer.cs new ST.Thread (delegate () { while (true) { try { System.Diagnostics.Process.GetProcessById (pid); } catch { ForceShutdown (); } ST.Thread.Sleep (1000); } }) Link To Source File
monodevelop Debugger.cs new System.Threading.Thread(new System.Threading.ThreadStart(Win32NativeEvent.Dispatch)) Link To Source File
monodevelop Process.cs new Thread (delegate () { ReadOutput (outputPipe, false); }) Link To Source File
monodevelop Process.cs new Thread (delegate () { ReadOutput (outputPipe, true); }) Link To Source File
monodevelop Connection.cs new Thread (new ThreadStart (receiver_thread_main)) Link To Source File
monodevelop Thread.cs new System.Threading.Thread (new ThreadStart (InternalRun)) Link To Source File
monodevelop ScheduledThreadPoolExecutor.cs new ST.Thread (SchedulerThread) Link To Source File
monodevelop TagDatabaseManager.cs new Thread (ParsingThread) Link To Source File
monodevelop DeployOperations.cs new System.Threading.Thread ( delegate () { using (mon) { mon.BeginTask ("Creating packages", packages.Count); foreach (Package p in packages) { DeployService.BuildPackage (mon, p); mon.Step (1); } mon.EndTask (); } }) Link To Source File
monodevelop SoftDebuggerSession.cs new Thread (EventHandler) Link To Source File
monodevelop SoftDebuggerSession.cs new Thread (delegate () { ReadOutput (reader, error); }) Link To Source File
monodevelop RemoteDesignerProcess.cs new System.Threading.Thread (GuiThread) Link To Source File
monodevelop RegexToolkitWindow.cs new Thread (delegate() { PerformQuery (inputTextview.Buffer.Text, this.entryRegEx.Text, this.entryReplace.Text, GetOptions ()); }) Link To Source File
monodevelop RegexLibraryWindow.cs new Thread (delegate() { try { Webservices services = new Webservices (); services.AllowAutoRedirect = true; this.expressions = services.ListAllAsXml (1230); Gtk.Application.Invoke (delegate { WriteRegexes (); UpdateExpressions (); }); } catch (ThreadAbortException) { Thread.ResetAbort (); } catch (Exception e) { MessageService.ShowError (GettextCatalog.GetString ("Error while synchronizing expressions."), e.Message); } finally { Gtk.Application.Invoke (delegate { SetButtonUpdate (GettextCatalog.GetString ("Update Library"), "gtk-refresh"); }); } }) Link To Source File
monodevelop AutoSave.cs new Thread (AutoSaveThread) Link To Source File
monodevelop NUnitService.cs new Thread (new ThreadStart (RunTests)) Link To Source File
monodevelop NUnitAssemblyTestSuite.cs new Thread (new ThreadStart (RunAsyncLoadTest)) Link To Source File
monodevelop ThreadAsyncOperation.cs new Thread (Run) Link To Source File
monodevelop SelectFileDialogHandler.cs new Thread (() => { try { result = func (data); } catch (Exception ex) { LoggingService.LogError ("Unhandled exception handling a native dialog", ex); } }) Link To Source File
monodevelop TimedEvaluator.cs new Thread (Runner) Link To Source File
monodevelop SyntaxModeService.cs new Thread (ProcessQueue) Link To Source File
monodevelop ProcessWrapper.cs new Thread (new ThreadStart(CaptureOutput)) Link To Source File
monodevelop ProcessWrapper.cs new Thread (new ThreadStart(CaptureError)) Link To Source File
monodevelop InstrumentationService.cs new Thread (delegate () { AutoSave (file, interval); }) Link To Source File
monodevelop Solution.cs new Thread (delegate () { try { using (mon) { cit.Execute (mon, context, configuration); } } catch (Exception ex) { LoggingService.LogError ("Project execution failed", ex); } }) Link To Source File
monodevelop ProjectDomService.cs new Thread(new ThreadStart(ParserUpdateThread)) Link To Source File
monodevelop ProjectCommands.cs new Thread ( delegate () { using (monitor) { try { cmd.Execute (monitor, ce, IdeApp.Workspace.ActiveConfiguration); } catch (Exception ex) { monitor.ReportError (GettextCatalog.GetString ("Command execution failed"), ex); } } } ) Link To Source File
monodevelop VersionInformationTabPage.cs new System.Threading.Thread (() => { try { var text = SystemInformation.ToText (); Gtk.Application.Invoke (delegate { if (destroyed) return; SetText (text); }); } catch (Exception ex) { LoggingService.LogError ("Failed to load version information", ex); Gtk.Application.Invoke (delegate { if (destroyed) return; SetLabel (GettextCatalog.GetString ("Failed to load version information.")); }); } }) Link To Source File
monodevelop DispatchService.cs new Thread (new ThreadStart (smc.Run)) Link To Source File
monodevelop DispatchService.cs new Thread (new ThreadStart (smc.Run)) Link To Source File
monodevelop UpdateService.cs new Thread (delegate () { CheckUpdates (mon, handlers, automatic); }) Link To Source File
monodevelop Main.cs new Thread (delegate () { while (true) { Thread.Sleep (1000); try { // Throws exception if process is not running. // When watching a .NET process from Mono, GetProcessById may // return the process with HasExited=true Process p = Process.GetProcessById (id); if (p.HasExited) break; } catch { break; } } exitEvent.Set (); }) Link To Source File
monodevelop ProjectBuilder.cs new Thread (STARunner) Link To Source File
monodevelop mdhost.cs new Thread (delegate () { while (true) { try { // Throws exception if process is not running. // When watching a .NET process from Mono, GetProcessById may // return the process with HasExited=true var p = System.Diagnostics.Process.GetProcessById (pid); if (p.HasExited) break; } catch { break; } Thread.Sleep (1000); } Environment.Exit (1); }) Link To Source File
TwitterStudio DialogboxPurger.cs new System.Threading.Thread(new ThreadStart(this.HandleDialogBoxes)) Link To Source File
mooege GameDebugCommands.cs new Thread(c => Application.Run(new WorldVisualizer(world, player))) Link To Source File
ncqrs TransactionalSqlPersistenceEngineTests.cs new Thread(() => { using (var nestedUow = uowFactory.CreateUnitOfWork(Guid.NewGuid())) { note2 = (Note) nestedUow.GetById(typeof (Note), note2Id, null); note2.ChangeText("Text 2 Modified from mested UoW"); nestedUow.Accept(); } }) Link To Source File
MonkeyBallz Client.cs new Thread(RecievePendingMessages) Link To Source File
MonkeyBallz Client.cs new Thread(HandleCommands) Link To Source File
bbwifimusicsync KayakServer.cs new Thread(new ThreadStart(Start)) Link To Source File
bbwifimusicsync OarsServer.cs new Thread(new ThreadStart(Dispatch)) Link To Source File
bbwifimusicsync WorkManager.cs new Thread(WorkerEntry) Link To Source File
WCFWeb JObjectFunctionalTest.cs new Thread(new ThreadStart(delegate { for (int j = 0; j < 10; j++) { try { string str = jo.ToString(); if (str != expected) { incorrectValue = true; Log.Info("Value is incorrect"); } } catch (Exception e) { exceptionThrown = true; Log.Info("Exception thrown: {0}", e); } } })) Link To Source File
NzbDrone JobProviderFixture.cs new Thread(() => jobProvider.QueueJob(typeof(FakeJob))) Link To Source File
NzbDrone JobProviderFixture.cs new Thread(() => jobProvider.QueueJob(typeof(FakeJob))) Link To Source File
NzbDrone JobProviderFixture.cs new Thread(Mocker.Resolve().QueueScheduled) Link To Source File
Disruptor-net BatchEventProcessorTests.cs new Thread(_batchEventProcessor.Run) Link To Source File
Disruptor-net BatchEventProcessorTests.cs new Thread(_batchEventProcessor.Run) Link To Source File
Disruptor-net BatchEventProcessorTests.cs new Thread(_batchEventProcessor.Run) Link To Source File
Disruptor-net MultiThreadedClaimStrategyTests.cs new Thread( ()=> { beforeLatch.Set(); Assert.AreEqual(_claimStrategy.BufferSize, _claimStrategy.IncrementAndGet(dependentSequences)); done.WriteFullFence(true); afterLatch.Set(); }) Link To Source File
Disruptor-net MultiThreadedClaimStrategyTests.cs new Thread( () => { var sequence = _claimStrategy.IncrementAndGet(dependentSequences); mre.Set(); Thread.Sleep(1000); _claimStrategy.SerialisePublishing(sequence, cursor, 1); }) Link To Source File
Disruptor-net MultiThreadedClaimStrategyTests.cs new Thread( () => { mre.WaitOne(); var sequence = _claimStrategy.IncrementAndGet(dependentSequences); _claimStrategy.SerialisePublishing(sequence, cursor, 1); }) Link To Source File
Disruptor-net SequenceBarrierTests.cs new Thread(() => { var sequence = _ringBuffer.Next(); _ringBuffer[sequence].Value = (int) sequence; _ringBuffer.Publish(sequence); foreach (var stubWorker in workers) { stubWorker.Sequence.Value = sequence; } }) Link To Source File
Disruptor-net SequenceBarrierTests.cs new Thread( () => { try { dependencyBarrier.WaitFor(expectedNumberEvents - 1); } catch (AlertException) { alerted[0] = true; } }) Link To Source File
Disruptor-net SequenceBarrierTests.cs new Thread(() => { foreach (var stubWorker in eventProcessors) { stubWorker.Sequence.Value += 1; } }) Link To Source File
Disruptor-net LifecycleAwareTests.cs new Thread(_batchEventProcessor.Run) Link To Source File
Disruptor-net MultiThreadedLowContentionClaimStrategyTests.cs new Thread(() => { beforeLatch.Set(); Assert.AreEqual(_claimStrategy.BufferSize, _claimStrategy.IncrementAndGet(dependentSequences)); done.WriteFullFence(true); afterLatch.Set(); }) Link To Source File
Disruptor-net MultiThreadedLowContentionClaimStrategyTests.cs new Thread( () => { var sequence = _claimStrategy.IncrementAndGet(dependentSequences); mre.Set(); Thread.Sleep(1000); _claimStrategy.SerialisePublishing(sequence, cursor, 1); }) Link To Source File
Disruptor-net MultiThreadedLowContentionClaimStrategyTests.cs new Thread( () => { mre.WaitOne(); var sequence = _claimStrategy.IncrementAndGet(dependentSequences); _claimStrategy.SerialisePublishing(sequence, cursor, 1); }) Link To Source File
Disruptor-net RingBufferTests.cs new Thread( () => { for (int i = 0; i <= ringBufferSize; i++) // produce 5 events { var sequence = ringBuffer.Next(); StubEvent evt = ringBuffer[sequence]; evt.Value = i; ringBuffer.Publish(sequence); if (i == 3) // unblock main thread after 4th event published { mre.Set(); } } producerComplete = true; }) Link To Source File
Disruptor-net SequencerTests.cs new Thread( () => { waitingLatch.Set(); Assert.AreEqual(expectedSequence, barrier.WaitFor(expectedSequence)); _gatingSequence.Value = expectedSequence; doneLatch.Set(); }) Link To Source File
Disruptor-net SequencerTests.cs new Thread( ()=> { waitingLatch.Set(); _sequencer.Publish(_sequencer.Next()); doneLatch.Set(); }) Link To Source File
Disruptor-net SingleThreadedClaimStrategyTests.cs new Thread( ()=> { beforeLatch.Set(); Assert.AreEqual(_claimStrategy.BufferSize, _claimStrategy.IncrementAndGet(dependentSequences)); done.WriteFullFence(true); afterLatch.Set(); }) Link To Source File
Experiments MultiThreadBufferedReader.cs new Thread(ReadSource) Link To Source File
CodingDojoHelper DialogboxPurger.cs new System.Threading.Thread(new ThreadStart(this.HandleDialogBoxes)) Link To Source File
DBMulticast MultiCast.cs new Thread(ts) Link To Source File
Log2Console ShellLibrary.cs new Thread(() => { hr = ShellNativeMethods.SHShowManageLibraryUI( shellLibrary.NativeShellItem, windowHandle, title, instruction, allowAllLocations ? ShellNativeMethods.LIBRARYMANAGEDIALOGOPTIONS.LMD_NOUNINDEXABLELOCATIONWARNING : ShellNativeMethods.LIBRARYMANAGEDIALOGOPTIONS.LMD_DEFAULT); }) Link To Source File
Log2Console DebugMonitor.cs new Thread(new ThreadStart(Capture)) Link To Source File
Log2Console UdpReceiver.cs new Thread(Start) Link To Source File
memocloud ThreadUtil.cs new Thread(new ThreadStart(() => a())) Link To Source File
Floe DccOperation.cs new Thread(new ThreadStart(() => { var ar = _listener.BeginAcceptTcpClient(null, null); int index = WaitHandle.WaitAny(new[] { ar.AsyncWaitHandle, _endHandle }, ListenTimeout); switch (index) { case 0: try { _tcpClient = _listener.EndAcceptTcpClient((IAsyncResult)ar); } catch (SocketException) { break; } finally { _listener.Stop(); } var endpoint = (IPEndPoint)_tcpClient.Client.RemoteEndPoint; this.Address = endpoint.Address; this.Port = endpoint.Port; this.OnConnected(); try { this.SocketLoop(); } catch (Exception ex) { this.OnError(ex); } break; case 1: _listener.Stop(); break; case WaitHandle.WaitTimeout: _listener.Stop(); this.OnError(new TimeoutException()); break; } })) Link To Source File
Floe DccOperation.cs new Thread(new ThreadStart(() => { var ar = _tcpClient.BeginConnect(address, port, null, null); if (ar.AsyncWaitHandle.WaitOne(ConnectTimeout)) { try { _tcpClient.EndConnect(ar); this.OnConnected(); } catch (SocketException ex) { this.OnError(ex); return; } catch (NullReferenceException) { return; } try { this.SocketLoop(); } catch(Exception ex) { this.OnError(ex); } } else { this.OnError(new TimeoutException()); } })) Link To Source File
Floe IrcConnection.cs new Thread(new ThreadStart(this.SocketMain)) Link To Source File
Floe RtpClient.cs new Thread(new ThreadStart(ThreadProc)) Link To Source File
ravendb TimeoutTester.cs new Thread(() => { lock (locker) { using (var session = store.OpenSession()) { for (int i = 0; i < 100; i++) { var answerInfo = session.Query() .OrderBy(x => x.Content) .Skip(0).Take(1) .As() .FirstOrDefault(); Assert.NotNull(answerInfo); } } using (var session = store.OpenSession()) { var answer = session.Load(answerId); Assert.NotNull(answer); answer.Content += k.ToString(); session.Store(answer); session.SaveChanges(); } } }) Link To Source File
ravendb GeneralStorage.cs new Thread(() => { var cmds = new List(); for (var k = 0; k < 100; k++) { var newId = Interlocked.Increment(ref numberOfDocsAdded); cmds.Add(new PutCommandData { Document = new RavenJObject(), Metadata = new RavenJObject(), Key = newId.ToString() }); }; db.Batch(cmds); }) Link To Source File
ravendb HowDoI.cs new Thread(workers[i].DoWork) Link To Source File
ravendb BasicTableTests.cs new Thread(() => { Thread.BeginThreadAffinity(); Api.JetSetSessionContext(this.sesid, context); Api.JetBeginTransaction(this.sesid); Api.JetResetSessionContext(this.sesid); Thread.EndThreadAffinity(); }) Link To Source File
ravendb MemoryCacheTests.cs new Thread(() => this.MemoryCacheStressThread(i, endTime)) Link To Source File
ravendb SimplePerfTest.cs new Thread( () => { using (var worker = new PerfTestWorker(this.instance, this.database)) { action(worker); } }) Link To Source File
ravendb InstanceTests.cs new Thread(() => InstanceInitTermThread(instanceName)) Link To Source File
ravendb InitTermTests.cs new Thread(() => { Thread.BeginThreadAffinity(); Api.JetSetSessionContext(session, context); Api.JetBeginTransaction(session); Api.JetResetSessionContext(session); Thread.EndThreadAffinity(); }) Link To Source File
Fotoshredder PhotoTransfer.cs new Thread(this.SpeedWatchdog) Link To Source File
Fotoshredder FancyLogger.cs new Thread(this.DisplayMessage) Link To Source File
Unzbin---Invisible-Ice-Edition Connection.cs new Thread(this.internalManager) Link To Source File
Unzbin---Invisible-Ice-Edition Connection.cs new Thread(this.SpeedCalculator) Link To Source File
QuickGraph FixtureRunner.cs new Thread(new ThreadStart(worker.RunAsync)) Link To Source File
QuickGraph TestRunner.cs new Thread(new ThreadStart(this.OpenReport)) Link To Source File
Mobile UserController.cs new Thread(bgWatcherUpdate) Link To Source File
MonoMobile.Views ProgressHud.cs new System.Threading.Thread(() => { using (NSAutoreleasePool pool = new NSAutoreleasePool()) { execute(); } }) Link To Source File
MonoMobile.Views ProgressHud.cs new System.Threading.Thread(() => { using (NSAutoreleasePool pool = new NSAutoreleasePool()) { execute(); Completed(); } }) Link To Source File
MonoMobile.Views DialogViewController.cs new Thread(threadStart) Link To Source File
MonoMobile.Views HttpDebug.cs new Thread(HttpServer) Link To Source File
MonoMobile.Views AppDelegate.cs new Thread(Startup) Link To Source File
RS-TV-Show-Tracker BinSearchDownloader.cs new Thread(() => InternalDownload(url, target, token ?? string.Empty)) Link To Source File
RS-TV-Show-Tracker PodnapisiDownloader.cs new Thread(() => InternalDownload(url, target, token ?? string.Empty)) Link To Source File
RS-TV-Show-Tracker HttpToSocks.cs new Thread(Timeout) Link To Source File
RS-TV-Show-Tracker LinkCheckerEngine.cs new Thread(() => { try { var avail = Check(url); LinkCheckerDone.Fire(this, avail); } catch (Exception ex) { LinkCheckerError.Fire(this, "There was an error while checking the link for availability.", ex); } }) Link To Source File
RS-TV-Show-Tracker OpenArchiveTaskDialog.cs new Thread(() => TaskDialogButtonClick(s, e)) Link To Source File
RS-TV-Show-Tracker OpenArchiveTaskDialog.cs new Thread(() => _td.Show()) Link To Source File
RS-TV-Show-Tracker OpenArchiveTaskDialog.cs new Thread(() => _td.Show()) Link To Source File
RS-TV-Show-Tracker OpenArchiveTaskDialog.cs new Thread(() => { Thread.Sleep(250); Utils.Run(_ext); Thread.Sleep(10000); AskAfterUse(); }) Link To Source File
RS-TV-Show-Tracker OpenArchiveTaskDialog.cs new Thread(() => file.WriteToFile(_ext, _el)) Link To Source File
RS-TV-Show-Tracker OpenArchiveTaskDialog.cs new Thread(() => { Thread.Sleep(1000); try { File.Delete(_ext); } catch { } }) Link To Source File
RS-TV-Show-Tracker SubtitleDownloadTaskDialog.cs new Thread(() => _res = _td.Show().CommonButton) Link To Source File
RS-TV-Show-Tracker SubtitleDownloadTaskDialog.cs new Thread(() => _res = _td.Show().CommonButton) Link To Source File
RS-TV-Show-Tracker SubtitleDownloadTaskDialog.cs new Thread(() => { NearVideoFinishMove(_files[c.ButtonID], e.First, e.Second); if (_play) { if (OpenArchiveTaskDialog.SupportedArchives.Contains(Path.GetExtension(_files[0]).ToLower())) { new OpenArchiveTaskDialog().OpenArchive(_files[c.ButtonID]); } else { Utils.Run(_files[c.ButtonID]); } } }) Link To Source File
RS-TV-Show-Tracker LinkDownloadTaskDialog.cs new Thread(() => _res = _td.Show().CommonButton) Link To Source File
RS-TV-Show-Tracker OnlineVideoSearchEngineTaskDialog.cs new Thread(() => _res = _td.Show().CommonButton) Link To Source File
RS-TV-Show-Tracker FileSearchTaskDialog.cs new Thread(() => { Thread.Sleep(500); if (_active) { _res = _td.Show().CommonButton; } }) Link To Source File
RS-TV-Show-Tracker SubsceneDownloader.cs new Thread(() => InternalDownload(url, target, token ?? string.Empty)) Link To Source File
RS-TV-Show-Tracker ProxiesSettings.xaml.cs new Thread(() => new TaskDialog { CommonIcon = TaskDialogIcon.SecurityWarning, Title = sel.Name, Instruction = "Potentially dangerous", Content = "This proxy points to a local loopback address on port " + uri.Port + "./r/nYour requests will go to " + app + ", which will most likely forward them to an external server." }.Show()) Link To Source File
RS-TV-Show-Tracker ProxiesSettings.xaml.cs new Thread(() => td.Show()) Link To Source File
RS-TV-Show-Tracker ProxiesSettings.xaml.cs new Thread(() => { try { var src = new Bing(); var res = new List(); res.AddRange(src.Search(uri.Host + " intitle:proxy")); if (res.Count == 0) { res.AddRange(src.Search(uri.Host + " intitle:proxies")); } done = true; if (td.IsShowing) { td.SimulateButtonClick(-1); } if (res.Count == 0) { new TaskDialog { CommonIcon = TaskDialogIcon.SecuritySuccess, Title = sel.Name, Instruction = "Not a known public proxy", Content = uri.Host + " does not seem to be a known public proxy." + Environment.NewLine + Environment.NewLine + "If your goal is to trick proxy detectors, you're probably safe for now. However, you shouldn't use public proxies if you don't want to potentially compromise your account." }.Show(); return; } else { new TaskDialog { CommonIcon = TaskDialogIcon.SecurityError, Title = sel.Name, Instruction = "Known public proxy", Content = uri.Host + " is a known public proxy according to " + new Uri(res[0].URL).Host.Replace("www.", string.Empty) + Environment.NewLine + Environment.NewLine + "If the site you're trying to access through this proxy forbids proxy usage, they're most likely use a detection mechanism too, which will trigger an alert when it sees this IP address. Your requests will be denied and your account might also get banned. Even if the site's detector won't recognize it, using a public proxy is not such a good idea, because you could compromise your account as public proxy operators are known to be evil sometimes." }.Show(); return; } } catch (ThreadAbortException) { } catch (Exception ex) { done = true; if (td.IsShowing) { td.SimulateButtonClick(-1); } new TaskDialog { CommonIcon = TaskDialogIcon.Stop, Title = sel.Name, Instruction = "Connection error", Content = "An error occured while checking the proxy.", ExpandedControlText = "Show exception message", ExpandedInformation = ex.Message }.Show(); } }) Link To Source File
RS-TV-Show-Tracker ProxiesSettings.xaml.cs new Thread(() => td.Show()) Link To Source File
RS-TV-Show-Tracker ProxiesSettings.xaml.cs new Thread(() => { var s = Stopwatch.StartNew(); try { var b = Utils.GetHTML("http://rolisoft.net/b", proxy: sel.Address); s.Stop(); done = true; if (td.IsShowing) { td.SimulateButtonClick(-1); } var tor = b.DocumentNode.SelectSingleNode("//img[@class='tor']"); var ip = b.DocumentNode.GetTextValue("//span[@class='ip'][1]"); var host = b.DocumentNode.GetTextValue("//span[@class='host'][1]"); var geo = b.DocumentNode.GetTextValue("//span[@class='geoip'][1]"); if (tor != null) { new TaskDialog { CommonIcon = TaskDialogIcon.SecurityError, Title = sel.Name, Instruction = "TOR detected", Content = ip + " is a TOR exit node." + Environment.NewLine + Environment.NewLine + "If the site you're trying to access through this proxy forbids proxy usage, they're most likely use a detection mechanism too, which will trigger an alert when it sees this IP address. Your requests will be denied and your account might also get banned. Even if the site's detector won't recognize it, using TOR is not such a good idea, because you could compromise your account as TOR exit node operators are known to be evil sometimes." }.Show(); } if (ip == null) { new TaskDialog { CommonIcon = TaskDialogIcon.Stop, Title = sel.Name, Instruction = "Proxy error", Content = "The proxy did not return the requested resource, or greatly modified the structure of the page. Either way, it is not suitable for use with this software.", }.Show(); return; } new TaskDialog { CommonIcon = TaskDialogIcon.Information, Title = sel.Name, Instruction = "Test results", Content = "Total time to get rolisoft.net/b: " + s.Elapsed + "/r/n/r/nIP address: " + ip + "/r/nHost name: " + host + "/r/nGeoIP lookup: " + geo, }.Show(); } catch (ThreadAbortException) { } catch (Exception ex) { done = true; if (td.IsShowing) { td.SimulateButtonClick(-1); } new TaskDialog { CommonIcon = TaskDialogIcon.Stop, Title = sel.Name, Instruction = "Connection error", Content = "An error occured while connecting to the proxy.", ExpandedControlText = "Show exception message", ExpandedInformation = ex.Message }.Show(); } finally { if (s.IsRunning) { s.Stop(); } } }) Link To Source File
RS-TV-Show-Tracker XMLTVSettings.xaml.cs new Thread(() => { var i = 1; foreach (var sel in sels) { Database.ShowData(sel.Show.ShowID, "title." + sel.LangCode, string.Empty); sel.Show.GetForeignTitle(sel.LangCode, true, s => td.Content = s); td.ProgressBarPosition = (int) Math.Round(((double) i/(double) sels.Count)*100d); i++; } td.SimulateButtonClick(-1); }) Link To Source File
RS-TV-Show-Tracker XMLTVSettings.xaml.cs new Thread(() => td.Show()) Link To Source File
RS-TV-Show-Tracker AddNewWindow.xaml.cs new Thread(() => { try { _shows = _guide.GetID(show, lang).ToList(); if (_shows.Count == 0) { var up = new Exception(); throw up; // hehe } } catch (Exception ex) { if (ex is ThreadAbortException) { return; } Dispatcher.Invoke((Action)(() => { workingTabItem.Visibility = Visibility.Collapsed; addTabItem.Visibility = Visibility.Visible; tabControl.SelectedIndex = 0; Utils.Win7Taskbar(state: TaskbarProgressBarState.NoProgress); })); new TaskDialog { Icon = TaskDialogStandardIcon.Error, Caption = "Couldn't find TV show", InstructionText = show.ToUppercaseWords(), Text = "Couldn't find the specified TV show on this database.", DetailsExpandedText = "If this is a popular TV show, then you maybe just misspelled it or didn't enter the full official name./r/nIf this is a rare or foreign TV show, try using another database.", Cancelable = true }.Show(); return; } Dispatcher.Invoke((Action)(() => { listBox.Items.Clear(); foreach (var id in _shows) { listBox.Items.Add(id.Title); } listBox.SelectedIndex = 0; Utils.Win7Taskbar(state: TaskbarProgressBarState.NoProgress); workingTabItem.Visibility = Visibility.Collapsed; selectTabItem.Visibility = Visibility.Visible; tabControl.SelectedIndex = 2; })); }) Link To Source File
RS-TV-Show-Tracker AddNewWindow.xaml.cs new Thread(() => { // get data from guide TVShow tv; try { tv = _guide.GetData(show.ID, lang); if (tv.Episodes.Count == 0) { throw new Exception("There aren't any episodes associated to this TV show on this database."); } } catch (Exception ex) { if (ex is ThreadAbortException) { return; } Dispatcher.Invoke((Action)(() => { workingTabItem.Visibility = Visibility.Collapsed; addTabItem.Visibility = Visibility.Visible; tabControl.SelectedIndex = 0; Utils.Win7Taskbar(state: TaskbarProgressBarState.NoProgress); })); new TaskDialog { Icon = TaskDialogStandardIcon.Error, Caption = "Couldn't grab TV show", InstructionText = show.Title, Text = "Couldn't download the episode listing and associated informations due to an unexpected error.", DetailsExpandedText = ex.Message, Cancelable = true }.Show(); return; } // try to see if duplicate if (Database.GetShowID(tv.Title) != int.MinValue) { Dispatcher.Invoke((Action)(() => { workingTabItem.Visibility = Visibility.Collapsed; addTabItem.Visibility = Visibility.Visible; tabControl.SelectedIndex = 0; Utils.Win7Taskbar(state: TaskbarProgressBarState.NoProgress); })); new TaskDialog { Icon = TaskDialogStandardIcon.Error, Caption = "Duplicate entry", InstructionText = tv.Title, Text = "This TV show is already on your list.", Cancelable = true }.Show(); return; } // create transaction SQLiteTransaction tr; try { tr = Database.Connection.BeginTransaction(); } catch (Exception ex) { if (ex is ThreadAbortException) { return; } Dispatcher.Invoke((Action)(() => { workingTabItem.Visibility = Visibility.Collapsed; addTabItem.Visibility = Visibility.Visible; tabControl.SelectedIndex = 0; Utils.Win7Taskbar(state: TaskbarProgressBarState.NoProgress); })); new TaskDialog { Icon = TaskDialogStandardIcon.Error, Caption = "Couldn't create transaction", InstructionText = tv.Title, Text = "Couldn't create transaction on the database to insert the episodes. The TV show is added to the list, however, there aren't any episodes associated to it. Run an update to add the episodes.", DetailsExpandedText = ex.Message, Cancelable = true }.Show(); return; } // insert into tvshows and let the autoincrementing field assign a showid Database.Execute("update tvshows set rowid = rowid + 1"); Database.Execute("insert into tvshows values (1, null, ?, ?)", tv.Title, show.Title != tv.Title ? ShowNames.Parser.GenerateTitleRegex(show.Title).ToString() : string.Empty); // then get that showid _dbid = Database.Query("select showid from tvshows where name = ? limit 1", tv.Title)[0]["showid"].ToInteger(); // insert guide fields var gname = _guide.GetType().Name; Database.ShowData(_dbid, "grabber", gname); Database.ShowData(_dbid, gname + ".id", show.ID); Database.ShowData(_dbid, gname + ".lang", lang); // insert showdata fields Database.ShowData(_dbid, "genre", tv.Genre); Database.ShowData(_dbid, "descr", tv.Description); Database.ShowData(_dbid, "cover", tv.Cover); Database.ShowData(_dbid, "airing", tv.Airing.ToString()); Database.ShowData(_dbid, "airtime", tv.AirTime); Database.ShowData(_dbid, "airday", tv.AirDay); Database.ShowData(_dbid, "network", tv.Network); Database.ShowData(_dbid, "timezone", tv.TimeZone); Database.ShowData(_dbid, "runtime", tv.Runtime.ToString()); Database.ShowData(_dbid, "url", tv.URL); // insert episodes foreach (var ep in tv.Episodes) { try { Database.ExecuteOnTransaction(tr, "insert into episodes values (?, ?, ?, ?, ?, ?, ?, ?, ?)", ep.Number + (ep.Season * 1000) + (_dbid * 100 * 1000), _dbid, ep.Season, ep.Number, tv.AirTime == String.Empty || ep.Airdate == Utils.UnixEpoch ? ep.Airdate.ToUnixTimestamp() : DateTime.Parse(ep.Airdate.ToString("yyyy-MM-dd ") + tv.AirTime).ToLocalTimeZone(tv.TimeZone).ToUnixTimestamp(), ep.Title, ep.Summary, ep.Picture, ep.URL); } catch { continue; } } // commit the changes tr.Commit(); // fire data change event Database.CopyToMemory(); MainWindow.Active.DataChanged(); // asynchronously update lab.rolisoft.net's cache Updater.UpdateRemoteCache(new Tuple(_guide.GetType().Name, show.ID), tv); // show finish page Dispatcher.Invoke((Action)(() => { finishTitle.Content = tv.Title; workingTabItem.Visibility = Visibility.Collapsed; finishTabItem.Visibility = Visibility.Visible; tabControl.SelectedIndex = 3; Utils.Win7Taskbar(state: TaskbarProgressBarState.NoProgress); var shows = Database.Query("select season, episode, name, airdate from episodes where showid = ? order by (season * 1000 + episode) desc", _dbid); markUntil.Items.Clear(); var gotLast = false; foreach (var item in shows) { markUntil.Items.Add("S{0:00}E{1:00} - {2}".FormatWith(item["season"].ToInteger(), item["episode"].ToInteger(), item["name"])); if (!gotLast && item["airdate"].ToInteger() < DateTime.Now.ToUnixTimestamp() && item["airdate"] != "0") { gotLast = true; markUntil.Items[markUntil.Items.Count - 1] += " [last aired episode]"; } } })); }) Link To Source File
RS-TV-Show-Tracker DownloadLinksPage.xaml.cs new Thread(item.CheckLink) Link To Source File
RS-TV-Show-Tracker FileSearch.cs new Thread(Search) Link To Source File
RS-TV-Show-Tracker GuidesPage.xaml.cs new Thread(() => { var episodes = config.Plugin.GetListing(config).ToList(); ResetStatus(); Dispatcher.Invoke((Action)(() => { UpcomingListViewItemCollection.RaiseListChangedEvents = false; foreach (var episode in episodes) { UpcomingListViewItemCollection.Add(new UpcomingListViewItem { Programme = episode, Show = episode.Name + (!string.IsNullOrWhiteSpace(episode.Number) ? " " + episode.Number : string.Empty), Name = !string.IsNullOrWhiteSpace(episode.Description) ? " · " + episode.Description : string.Empty, Airdate = episode.Airdate.DayOfWeek + " / " + episode.Airdate.ToString("h:mm tt") + " / " + episode.Channel, RelativeDate = episode.Airdate.ToShortRelativeDate() }); } UpcomingListViewItemCollection.RaiseListChangedEvents = true; UpcomingListViewItemCollection.ResetBindings(); tabControl.Visibility = generalTab.Visibility = showGeneral.Visibility = episodeListTab.Visibility = listView.Visibility = Visibility.Collapsed; upcomingListView.Visibility = Visibility.Visible; })); _workThd = null; }) Link To Source File
RS-TV-Show-Tracker GuidesPage.xaml.cs new Thread(() => { var cover = CoverManager.GetCover(show.Name, s => Dispatcher.Invoke((Action)(() => SetStatus(s, true)))); Dispatcher.Invoke((Action)(() => { showGeneralCover.Source = new BitmapImage(cover ?? new Uri("/RSTVShowTracker;component/Images/cd.png", UriKind.Relative)); ResetStatus(); })); _workThd = null; }) Link To Source File
RS-TV-Show-Tracker ParserWindow.xaml.cs new Thread(() => td.Show()) Link To Source File
RS-TV-Show-Tracker ParserWindow.xaml.cs new Thread(() => { try { var cookies = Parser.Login(user, pass); done = true; if (td.IsShowing) { td.SimulateButtonClick(-1); } if (string.IsNullOrWhiteSpace(cookies)) { new TaskDialog { CommonIcon = TaskDialogIcon.Stop, Title = Parser.Name, Instruction = "Login error", Content = "The site didn't return any cookies. The username and password combination is most likely wrong.", }.Show(); return; } Dispatcher.Invoke((Action)(() => cookiesTextBox.Text = cookies)); } catch (ThreadAbortException) { } catch (Exception ex) { done = true; if (td.IsShowing) { td.SimulateButtonClick(-1); } new TaskDialog { CommonIcon = TaskDialogIcon.Stop, Title = Parser.Name, Instruction = "Login error", Content = "An error occured while logging in to the site.", ExpandedControlText = "Show exception message", ExpandedInformation = ex.Message }.Show(); } }) Link To Source File
RS-TV-Show-Tracker RenamerWindow.xaml.cs new Thread(() => AddFilesInternal(files, first)) Link To Source File
RS-TV-Show-Tracker RenamerWindow.xaml.cs new Thread(RenameRecognizedFiles) Link To Source File
RS-TV-Show-Tracker SettingsWindow.xaml.cs new Thread(() => Dispatcher.Invoke((Action)(() => MainWindow.Active.activeDownloadLinksPage.LoadEngines(true)))) Link To Source File
RS-TV-Show-Tracker DownloadSearchEngine.cs new Thread(() => { try { var list = Search(query); foreach (var link in list) { DownloadSearchNewLink.Fire(this, link); } DownloadSearchDone.Fire(this); } catch (InvalidCredentialException) { var info = Settings.Get(Name + " Login"); if (!CanLogin || string.IsNullOrWhiteSpace(info)) { DownloadSearchDone.Fire(this); return; } try { var usrpwd = Utils.Decrypt(info, GetType().FullName + Environment.NewLine + Utils.GetUUID()).Split(new[] { '/0' }, 2); var cookies = Login(usrpwd[0], usrpwd[1]); Cookies = cookies; Settings.Set(Name + " Cookies", cookies); var list = Search(query); foreach (var link in list) { DownloadSearchNewLink.Fire(this, link); } DownloadSearchDone.Fire(this); } catch (InvalidCredentialException) { DownloadSearchDone.Fire(this); } catch (Exception ex) { DownloadSearchError.Fire(this, "There was an error while searching for download links.", ex); } } catch (Exception ex) { DownloadSearchError.Fire(this, "There was an error while searching for download links.", ex); } }) Link To Source File
RS-TV-Show-Tracker OnlineVideoSearchEngine.cs new Thread(() => { try { var url = Search(ep); OnlineSearchDone.Fire(this, "{0} S{1:00}E{2:00}".FormatWith(ep.Show.Name, ep.Season, ep.Number), url); } catch (OnlineVideoNotFoundException ex) { OnlineSearchError.Fire(this, "{0} S{1:00}E{2:00}".FormatWith(ep.Show.Name, ep.Season, ep.Number), ex.Message, new Tuple(ex.LinkTitle, ex.LinkURL, null)); } catch (Exception ex) { OnlineSearchError.Fire(this, "{0} S{1:00}E{2:00}".FormatWith(ep.Show.Name, ep.Season, ep.Number), "There was an error while searching for the video on this service.", new Tuple(null, null, ex.Message)); } }) Link To Source File
RS-TV-Show-Tracker SubtitleSearchEngine.cs new Thread(() => { try { var list = Search(query); foreach (var sub in list) { SubtitleSearchNewLink.Fire(this, sub); } SubtitleSearchDone.Fire(this); } catch (Exception ex) { SubtitleSearchError.Fire(this, "There was an error while searching for subtitles.", ex); } }) Link To Source File
RS-TV-Show-Tracker RecommendationsPage.xaml.cs new Thread(() => { var infos = API.GetMultipleShowInfo(shows); Dispatcher.Invoke((Action)(() => { foreach (var show in RecommendationsListViewItemCollection) { try { if (infos[show.Name].Error != null) { continue; } show.Tagline = infos[show.Name].Tagline ?? Regex.Replace(infos[show.Name].Description ?? string.Empty, @"/s+", " ", RegexOptions.Multiline); show.Description = infos[show.Name].Description; show.Picture = "http://" + API.EndPoint + "?/GetShowCover/" + Uri.EscapeUriString(show.Name); show.InfoSource = infos[show.Name].Source; if (!string.IsNullOrWhiteSpace(infos[show.Name].Genre)) { show.Genre = infos[show.Name].Genre; show.Info = show.Genre + " show; "; } if (infos[show.Name].Runtime != 0) { show.Info += infos[show.Name].Runtime + " minutes"; show.Runtime = infos[show.Name].Runtime.ToString(); } if (!string.IsNullOrWhiteSpace(show.Info)) { show.Info += Environment.NewLine; } if (infos[show.Name].Seasons != 0 && infos[show.Name].Episodes != 0) { show.Info += Utils.FormatNumber(infos[show.Name].Episodes, "episode") + " in " + Utils.FormatNumber(infos[show.Name].Seasons, "season") + "." + Environment.NewLine; show.Episodes = infos[show.Name].Episodes.ToString(); } var airs = string.Empty; if (!string.IsNullOrWhiteSpace(infos[show.Name].AirDay)) { airs += " " + infos[show.Name].AirDay; } if (!string.IsNullOrWhiteSpace(infos[show.Name].AirTime)) { airs += " at " + infos[show.Name].AirTime; } if (!string.IsNullOrWhiteSpace(infos[show.Name].Network)) { airs += " on " + infos[show.Name].Network; } if (!string.IsNullOrWhiteSpace(airs)) { show.Info += "Airs" + airs + Environment.NewLine; } if (infos[show.Name].Started != 0) { show.Info += "Started on " + ((double)infos[show.Name].Started).GetUnixTimestamp().ToString("MMMM d, yyyy", new CultureInfo("en-US")) + Environment.NewLine; } show.Info += infos[show.Name].Airing ? "Returning Series" : "Canceled/Ended"; show.Name = infos[show.Name].Title; } catch { } } listView.ItemsSource = null; listView.ItemsSource = RecommendationsListViewItemCollection; })); SetStatus("There are " + e.Data.Count + " shows on the list which you might like."); Utils.Win7Taskbar(state: TaskbarProgressBarState.NoProgress); }) Link To Source File
RS-TV-Show-Tracker Update.cs new Thread(() => { try { var info = new Remote.Objects.ShowInfo { Title = tv.Title, Description = tv.Description, Genre = tv.Genre, Cover = tv.Cover, Started = (long)tv.Episodes[0].Airdate.ToUnixTimestamp(), Airing = tv.Airing, AirTime = tv.AirTime, AirDay = tv.AirDay, Network = tv.Network, Runtime = tv.Runtime, Seasons = tv.Episodes.Last().Season, Episodes = tv.Episodes.Count, Source = guide.Item1, SourceID = guide.Item2 }; var hash = BitConverter.ToString(new HMACSHA256(Encoding.ASCII.GetBytes(Utils.GetUUID() + "/0" + Signature.Version)).ComputeHash(Encoding.UTF8.GetBytes( info.Title + info.Description + string.Join(string.Empty, info.Genre) + info.Cover + info.Started + (info.Airing ? "true" : "false") + info.AirTime + info.AirDay + info.Network + info.Runtime + info.Seasons + info.Episodes + info.Source + info.SourceID ))).ToLower().Replace("-", string.Empty); API.SetShowInfo(info, hash); } catch { } }) Link To Source File
RS-TV-Show-Tracker Database.cs new Thread(() => Remote.API.SetForeignTitle(TVShows[id].Name, search, language)) Link To Source File
RS-TV-Show-Tracker Database.cs new Thread(() => Remote.API.SetForeignTitle(TVShows[id].Name, "!", language)) Link To Source File
MOUSE Node.cs new Thread(UpdateLoop) Link To Source File
natix FixedSizeScheduler.cs new Thread (doIt) Link To Source File
natix FixedSizeScheduler.cs new Thread (doIt) Link To Source File
GenesisEngine WindowManager.cs new Thread(() => { _windowDispatcher = Dispatcher.CurrentDispatcher; dispatcherCreatedEvent.Set(); Dispatcher.Run(); }) Link To Source File
PROMPT11-07-ConcurrentProgramming.sandrapatfer ThreadPool.cs new Thread(ThreadWork) Link To Source File
PROMPT11-07-ConcurrentProgramming.sandrapatfer ThreadPool.cs new Thread(ThreadWork) Link To Source File
Picasso MainForm.cs new Thread( new ThreadStart( MoveCycle ) ) Link To Source File
Picasso MainForm.cs new Thread( new ThreadStart( SearchSolution ) ) Link To Source File
Picasso MainForm.cs new Thread( new ThreadStart( SearchSolution ) ) Link To Source File
Picasso MainForm.cs new Thread( new ThreadStart( SearchSolution ) ) Link To Source File
Picasso MainForm.cs new Thread( new ThreadStart( SearchSolution ) ) Link To Source File
Picasso MainForm.cs new Thread( new ThreadStart( QLearningThread ) ) Link To Source File
Picasso MainForm.cs new Thread( new ThreadStart( SarsaThread ) ) Link To Source File
Picasso MainForm.cs new Thread( new ThreadStart( ShowSolutionThread ) ) Link To Source File
Picasso MainForm.cs new Thread( new ThreadStart( SearchSolution ) ) Link To Source File
Picasso MainForm.cs new Thread( new ThreadStart( SearchSolution ) ) Link To Source File
Picasso MainForm.cs new Thread( new ThreadStart( SearchSolution ) ) Link To Source File
Picasso MainForm.cs new Thread( new ThreadStart( SearchSolution ) ) Link To Source File
Picasso MainForm.cs new Thread( new ThreadStart( SearchSolution ) ) Link To Source File
Picasso MainForm.cs new Thread( new ThreadStart( SearchSolution ) ) Link To Source File
Picasso MainForm.cs new Thread( new ThreadStart( SearchSolution ) ) Link To Source File
Picasso MainForm.cs new Thread( new ThreadStart( SearchSolution ) ) Link To Source File
Picasso MainForm.cs new Thread( new ThreadStart( SearchSolution ) ) Link To Source File
Picasso StereoViewForm.cs new Thread( new ThreadStart( stereoThread ) ) Link To Source File
Picasso SRV1.cs new Thread( new ThreadStart( CommunicationThread ) ) Link To Source File
Picasso SRV1Camera.cs new Thread( new ThreadStart( WorkerThread ) ) Link To Source File
Picasso Qwerk.Video.cs new Thread( new ThreadStart( WorkerThread ) ) Link To Source File
Picasso AsyncVideoSource.cs new Thread( new ThreadStart( imageProcessingThread_Worker ) ) Link To Source File
Picasso JPEGStream.cs new Thread( new ThreadStart( WorkerThread ) ) Link To Source File
Picasso MJPEGStream.cs new Thread( new ThreadStart( WorkerThread ) ) Link To Source File
Picasso FileVideoSource.cs new Thread( new ThreadStart( WorkerThread ) ) Link To Source File
Picasso VideoCaptureDevice.cs new Thread( new ThreadStart( WorkerThread ) ) Link To Source File
Picasso Kinect.cs new Thread( KinectStatusThread ) Link To Source File
Picasso AVIFileVideoSource.cs new Thread( new ThreadStart( WorkerThread ) ) Link To Source File
Picasso XimeaVideoSource.cs new Thread( new ThreadStart( WorkerThread ) ) Link To Source File
SimpleConcurrency FairThreadPool.cs new Thread(RunWorkers) Link To Source File
sones HttpServer.cs new Thread(DoListen) Link To Source File
sones SmartThreadPool.cs new Thread(ProcessQueuedItems) Link To Source File
sones SpecialTimer.cs new Thread(SlidingTimeoutThread) Link To Source File
sones ThreadPool.cs new Thread(new ThreadStart(Worker)) Link To Source File
sones TCPSocketListener.cs new Thread(new ThreadStart(Run)) Link To Source File
sones UDPSocketMulticast.cs new Thread(new ThreadStart(Run)) Link To Source File
sones DrainPipeLog.cs new Thread(new ThreadStart(WriteThreadInstance.Run)) Link To Source File
sones UDC_Client.cs new Thread(new ThreadStart(UDCClientThreadInstance.Run)) Link To Source File
csharputils AsyncTask.cs new Thread(delegate() { _Result = Getter(); Ready = true; Semaphore.Release(1); }) Link To Source File
csharputils CustomThreadPool.cs new Thread(ThreadBody) Link To Source File
csharputils GreenThread.cs new Thread(() => { ThisGreenThreadList.Value = This; ThisSemaphoreWaitOrParentThreadStopped(); try { Running = true; Action(); } catch (StopException) { } catch (Exception Exception) { RethrowException = Exception; } finally { Running = false; try { ParentSemaphore.Release(); } catch { } } //Console.WriteLine("GreenThread.Running: {0}", Running); }) Link To Source File
csharputils ProgressForm.cs new Thread(delegate() { Process(); if (Complete != null) Complete(); }) Link To Source File
csharputils ChannelDirectTCPIP.cs new System.Threading.Thread(this.run) Link To Source File
csharputils ChannelExec.cs new System.Threading.Thread(this.run) Link To Source File
csharputils ChannelForwardedTCPIP.cs new System.Threading.Thread(daemon.run) Link To Source File
csharputils ChannelShell.cs new System.Threading.Thread(this.run) Link To Source File
csharputils ChannelSubsystem.cs new System.Threading.Thread(this.run) Link To Source File
csharputils Session.cs new System.Threading.Thread(this.run) Link To Source File
csharputils Session.cs new System.Threading.Thread(channel.run) Link To Source File
csharputils Session.cs new System.Threading.Thread(pw.run) Link To Source File
csharputils Util.cs new Thread(new ThreadStart(runnable.run)) Link To Source File
csharputils ProcessBaseImplThreads.cs new Thread(delegate() { Semaphore.WaitOne(); //currentThread.Interrupt(); Delegate(); }) Link To Source File
csharputils ScgiServer.cs new Thread(() => { HandleConnectionOnSeparateThread(TcpClient); }) Link To Source File
csharputils ScgiServerTest.cs new Thread(() => { ScgiServer.AcceptLoop(); }) Link To Source File
csharputils ReaderWriterLockExtensionsTest.cs new Thread(() => { StartEvent.Signal(1); StartEvent.Wait(); StartedEvent.Signal(1); ReaderWriterLock.ReaderLock(() => { Thread.Sleep(60); }); EndEvent.Signal(1); }) Link To Source File
csharputils ReaderWriterLockExtensionsTest.cs new Thread(() => { StartEvent.Signal(1); StartEvent.Wait(); StartedEvent.Signal(1); ReaderWriterLock.ReaderLock(() => { Thread.Sleep(60); }); EndEvent.Signal(1); }) Link To Source File
csharputils ReaderWriterLockExtensionsTest.cs new Thread(() => { StartEvent.Signal(1); StartEvent.Wait(); StartedEvent.Signal(1); ReaderWriterLock.WriterLock(() => { Thread.Sleep(60); }); EndEvent.Signal(1); }) Link To Source File
csharputils ReaderWriterLockExtensionsTest.cs new Thread(() => { StartEvent.Signal(1); StartEvent.Wait(); StartedEvent.Signal(1); ReaderWriterLock.ReaderLock(() => { Thread.Sleep(60); }); EndEvent.Signal(1); }) Link To Source File
smrr-server CustomThreadPool.cs new Thread(ThreadBody) Link To Source File
Rock-ChMS QuartzScheduler.cs new Thread(starter.Run) Link To Source File
Rock-ChMS QuartzThread.cs new Thread(Run) Link To Source File
Rock-ChMS QuartzThread.cs new Thread(Run) Link To Source File
spring-net-amqp Program.cs new Thread(job) Link To Source File
StatLight ContinuousConsoleRunner.cs new Thread(() => { TryRun(); while (!ShouldExitFromInput()) { TryRun(); } }) Link To Source File
StatLight WebServerOnlyRunner.cs new Thread(() => { string line; do { line = Console.ReadLine(); } while (line.ToLower(CultureInfo.CurrentCulture) != "exit"); //string line; //while ((line = System.Console.ReadLine()) // .ToLower(CultureInfo.CurrentCulture) != "exit") //{ // ; //} }) Link To Source File
StatLight SelfHostedWebBrowser.cs new Thread(() => { _form = new Form { Height = _windowGeometry.Size.Height, Width = _windowGeometry.Size.Width, WindowState = GetBrowserVisibilityState(_browserVisible), ShowInTaskbar = _browserVisible, Icon = Properties.Resources.FavIcon, Text = "StatLight - Browser Host" }; var browser = new WebBrowser { Url = _pageToHost, Dock = DockStyle.Fill }; _form.Controls.Add(browser); Application.Run(_form); }) Link To Source File
FluentAutomation TestViewModel.cs new Thread(() => { STAExecuteCommands(this.RemoteCommands, this._manager); }) Link To Source File
NoCap CommandTask.cs new Thread(RunThread) Link To Source File
NoCap MessageManager.cs new Thread((ThreadStart)delegate { _window = new PowerRegWindow(); mre.Set(); _window.MessageLoop(); }) Link To Source File
NoCap ShellLibrary.cs new Thread( ()=> { IShellItem library = null; try { library = Helpers.GetShellItemFromPath(path); hr = NativeLibraryMethods.SHShowManageLibraryUI(library, hwndOwner, title, instruction, allowAllLocations ? Windows7.DesktopIntegration.Interop.SafeNativeMethods.LIBRARYMANAGEDIALOGOPTIONS.LMD_NOUNINDEXABLELOCATIONWARNING : Windows7.DesktopIntegration.Interop.SafeNativeMethods.LIBRARYMANAGEDIALOGOPTIONS.LMD_DEFAULT); } catch (Exception ex) { hr = Marshal.GetHRForException(ex); } finally { if (library != null) Marshal.ReleaseComObject(library); } }) Link To Source File
SharpBag InteractiveConsole.cs new Thread(this.ReadCommandListener) Link To Source File
hoehoe2 AppendSettingDialog.cs new Thread(new ThreadStart(() => { tw.GetInfoApi(null); if (IsHandleCreated && !IsDisposed) { Invoke(new MethodInvoker(DisplayApiMaxCount)); } })) Link To Source File
hoehoe2 Twitter.cs new Thread(UserStreamLoop) Link To Source File
snippets SocketServer.cs new Thread(Server) Link To Source File
snippets SocketServer.cs new Thread(new ServiceRunner(s, this).Run) Link To Source File
twdc CultureUtilTest.cs new Thread(() => { }) Link To Source File
ExpressUnit TestMethodViewModelTest.cs new Thread(TestBody) Link To Source File
mbta Runnable.cs new Thread(new ThreadStart(Run)) Link To Source File
Disruptor.NET Pipeline3StepLatencyPerfTest.cs new Thread(stepOneBatchConsumer.Run) Link To Source File
Disruptor.NET Pipeline3StepLatencyPerfTest.cs new Thread(stepTwoBatchConsumer.Run) Link To Source File
Disruptor.NET Pipeline3StepLatencyPerfTest.cs new Thread(stepThreeBatchConsumer.Run) Link To Source File
Disruptor.NET DisruptorTests.cs new Thread(batchConsumer.Run) Link To Source File
Disruptor.NET BatchConsumerSequenceTrackTest.cs new Thread(batchConsumer.Run) Link To Source File
Disruptor.NET BatchConsumerTests.cs new Thread(batchConsumer.Run) Link To Source File
Disruptor.NET BatchConsumerTests.cs new Thread(batchConsumer.Run) Link To Source File
Disruptor.NET BatchConsumerTests.cs new Thread(batchConsumer.Run) Link To Source File
Disruptor.NET ConsumerBarrierTests.cs new Thread(runnable) Link To Source File
Disruptor.NET ConsumerBarrierTests.cs new Thread(runnable) Link To Source File
Disruptor.NET ConsumerBarrierTests.cs new Thread(runnable) Link To Source File
dwarrowdelf ServerInAppDomain.cs new Thread(Main) Link To Source File
dwarrowdelf Connection.cs new Thread(ReceiveMain) Link To Source File
StarlitTwit FrmMain.cs new Thread(AutoGetTweet) Link To Source File
StarlitTwit ImageListWrapper.cs new Thread(GetImages) Link To Source File
StarlitTwit ToolStripStatusLabelEx.cs new Thread(SwitchText) Link To Source File
StarlitTwit Twitter.cs new Thread(ReadStreaming) Link To Source File
StarlitTwit Form1.cs new Thread(test1) Link To Source File
StarlitTwit Form1.cs new Thread(Transaction) Link To Source File
torshify NativeSession.cs new Thread(MainThreadLoop) Link To Source File
torshify NativeSession.cs new Thread(EventThreadLoop) Link To Source File
torshify-client ImageCacheService.cs new Thread(Run) Link To Source File
torshify-r4dio SpotifyRadioTrackPlayer.cs new Thread(() => { Thread.Sleep(5000); Initialize(); }) Link To Source File
alaris DccChatSession.cs new Thread(new ThreadStart( session.Listen ) ) Link To Source File
alaris DccFileSession.cs new Thread(Download) Link To Source File
alaris DccFileSession.cs new Thread(Download) Link To Source File
vcap-dotnet CloudTestAppParallelTest.cs new Thread(new ThreadStart(delegate { try { PushApp(name, cloudTestAppDir, url); } catch (Exception ex) { lock (lck) { exceptions.Add(ex); } } })) Link To Source File
vcap-dotnet CloudTestAppParallelTest.cs new Thread(new ThreadStart(delegate { try { client.DeleteApp(name); } catch (Exception ex) { lock (lck) { exceptions.Add(ex); } } })) Link To Source File
vcap-dotnet CloudTestAppParallelTest.cs new Thread(new ThreadStart(delegate { try { PushApp(name, cloudTestAppDir, url); } catch (Exception ex) { lock (lck) { exceptions.Add(ex); } } })) Link To Source File
vcap-dotnet CloudTestAppParallelTest.cs new Thread(new ThreadStart(delegate { try { client.DeleteApp(name); } catch (Exception ex) { lock (lck) { exceptions.Add(ex); } } })) Link To Source File
vcap-dotnet UmbracoParallelTest.cs new Thread(s) Link To Source File
vcap-dotnet UmbracoParallelTest.cs new Thread(s) Link To Source File
vcap-dotnet UmbracoParallelTest.cs new Thread(s) Link To Source File
vcap-dotnet UmbracoParallelTest.cs new Thread(s) Link To Source File
vcap-dotnet CloudTestAppTest.cs new Thread(new ThreadStart(delegate { try { PushApp(name, cloudTestAppDir, url); } catch (Exception ex) { lock (lck) { exceptions.Add(ex); } } })) Link To Source File
vcap-dotnet CloudTestAppTest.cs new Thread(new ThreadStart(delegate { try { client.DeleteApp(name); } catch (Exception ex) { lock (lck) { exceptions.Add(ex); } } })) Link To Source File
vcap-dotnet MsSqlServicesTest.cs new Thread(s) Link To Source File
vcap-dotnet MsSqlServicesTest.cs new Thread(s) Link To Source File
vcap-dotnet MsSqlServicesTest.cs new Thread(s) Link To Source File
vcap-dotnet MsSqlServicesTest.cs new Thread(s) Link To Source File
vcap-dotnet ClientEnd.cs new Thread( new ThreadStart( delegate { using (ChannelFactory channelFactory = new ChannelFactory(new BasicHttpBinding(), endpointAddress)) { ITunnel wcfTunnelChannel = channelFactory.CreateChannel(endpointAddress); while (!this.closing) { TcpClient acceptedClient = listener.AcceptTcpClient(); Guid serverConnectionId = Guid.Empty; try { serverConnectionId = wcfTunnelChannel.OpenConnection(); } catch (CommunicationException ex) { this.state = TunnelClientEndState.ServerUnavailable; Logger.Warning(TunnelErrorMessages.CouldNotOpenConnection, ex.ToString()); return; } clients[serverConnectionId] = acceptedClient; System.Threading.Thread threadReader = new System.Threading.Thread( new System.Threading.ParameterizedThreadStart(delegate(object objConnectionId) { Guid connectionId = (Guid)objConnectionId; TcpClient client = clients[connectionId]; while (!this.closing) { byte[] buffer = new byte[DataPackage.BufferSize]; int readCount = 0; try { readCount = client.GetStream().Read(buffer, 0, buffer.Length); } catch (IOException ex) { SocketException socketException = ex.InnerException as SocketException; // the 10054 means connection reset by peer if (socketException != null && socketException.ErrorCode == 10054) { client.Close(); try { wcfTunnelChannel.CloseConnection(connectionId); } catch (CommunicationException comEx) { this.state = TunnelClientEndState.ServerUnavailable; Logger.Warning(TunnelErrorMessages.CouldNotCloseConnection, comEx.ToString()); return; } break; } else { throw; } } if (readCount == 0) { client.Close(); try { wcfTunnelChannel.CloseConnection(connectionId); } catch (CommunicationException comEx) { this.state = TunnelClientEndState.ServerUnavailable; Logger.Warning(TunnelErrorMessages.CouldNotCloseConnection, comEx.ToString()); return; } break; } byte[] sendData = new byte[readCount]; Array.Copy(buffer, sendData, readCount); DataPackage sendDataPackage = new DataPackage(); sendDataPackage.Data = sendData; sendDataPackage.HasData = true; DataPackage receiveData = null; try { receiveData = wcfTunnelChannel.SendData(connectionId, sendDataPackage); } catch (CommunicationException comEx) { this.state = TunnelClientEndState.ServerUnavailable; Logger.Warning(TunnelErrorMessages.CouldNotSendData, comEx.ToString()); return; } if (receiveData.HasData) { client.GetStream().Write(receiveData.Data, 0, receiveData.Data.Length); } Thread.Sleep(DataPackage.PollInterval); } })); threadReader.IsBackground = true; this.connectionThreads.Add(threadReader); threadReader.Start(serverConnectionId); System.Threading.Thread threadWriter = new System.Threading.Thread( new System.Threading.ParameterizedThreadStart(delegate(object objConnectionId) { Guid connectionId = (Guid)objConnectionId; TcpClient client = clients[connectionId]; while (!this.closing && client.Connected) { DataPackage data = null; try { data = wcfTunnelChannel.ReceiveData(connectionId); } catch (CommunicationException comEx) { this.state = TunnelClientEndState.ServerUnavailable; Logger.Warning(TunnelErrorMessages.CouldNotReceiveData, comEx.ToString()); return; } if (data.HasData) { if (client != null) { client.GetStream().Write(data.Data, 0, data.Data.Length); } } Thread.Sleep(DataPackage.PollInterval); } })); threadWriter.IsBackground = true; this.connectionThreads.Add(threadWriter); threadWriter.Start(serverConnectionId); } } })) Link To Source File
vcap-dotnet ClientEnd.cs new Thread( new ThreadStart( delegate { using (ChannelFactory channelFactory = new ChannelFactory(new BasicHttpBinding(), endpointAddress)) { ITunnel wcfTunnelChannel = channelFactory.CreateChannel(endpointAddress); Guid serverConnectionId = Guid.Empty; try { serverConnectionId = wcfTunnelChannel.OpenConnection(); } catch (CommunicationException comEx) { this.state = TunnelClientEndState.ServerUnavailable; Logger.Warning(TunnelErrorMessages.CouldNotOpenConnection, comEx.ToString()); return; } System.Threading.Thread threadReader = new System.Threading.Thread( new System.Threading.ParameterizedThreadStart(delegate(object objConnectionId) { Guid connectionId = (Guid)objConnectionId; while (!this.closing) { byte[] buffer; IPEndPoint remoteEndPoint = new IPEndPoint(IPAddress.Any, localPort); buffer = listener.Receive(ref remoteEndPoint); DataPackage sendDataPackage = new DataPackage(); sendDataPackage.Data = buffer; sendDataPackage.HasData = true; try { wcfTunnelChannel.SendData(connectionId, sendDataPackage); } catch (CommunicationException comEx) { this.state = TunnelClientEndState.ServerUnavailable; Logger.Warning(TunnelErrorMessages.CouldNotSendData, comEx.ToString()); return; } Thread.Sleep(DataPackage.PollInterval); } })); threadReader.IsBackground = true; this.connectionThreads.Add(threadReader); if (listening) { threadReader.Start(serverConnectionId); } System.Threading.Thread threadWriter = new System.Threading.Thread( new System.Threading.ParameterizedThreadStart(delegate(object objConnectionId) { Guid connectionId = (Guid)objConnectionId; while (!this.closing) { DataPackage data = null; try { data = wcfTunnelChannel.ReceiveData(connectionId); } catch (CommunicationException comEx) { this.state = TunnelClientEndState.ServerUnavailable; Logger.Warning(TunnelErrorMessages.CouldNotReceiveData, comEx.ToString()); return; } if (data.HasData) { if (listener != null) { listener.Send(data.Data, data.Data.Length); } } Thread.Sleep(DataPackage.PollInterval); } })); threadWriter.IsBackground = true; this.connectionThreads.Add(threadWriter); if (!listening) { threadWriter.Start(serverConnectionId); } while (!this.closing) { Thread.Sleep(100); } } })) Link To Source File
Xtal DataStore.cs new Thread(new ThreadStart(workerMethod)) Link To Source File
MadCow MPQprocedure.cs new Thread(MpqTransfer) Link To Source File
MadCow Form1.cs new Thread(ThreadProc) Link To Source File
MadCow Form1.cs new Thread(ThreadProc) Link To Source File
MadCow Form1.cs new Thread(ThreadProc2) Link To Source File
MadCow Form1.cs new Thread(ThreadProc2) Link To Source File
MadCow Form1.cs new Thread(MPQThread) Link To Source File
MadCow Form1.cs new Thread(ThreadProc) Link To Source File
MadCow Form1.cs new Thread(ThreadFunction) Link To Source File
lucene.net SupportClass.cs new System.Threading.Thread(new System.Threading.ThreadStart(Run)) Link To Source File
lucene.net SupportClass.cs new System.Threading.Thread(new System.Threading.ThreadStart(Run)) Link To Source File
lucene.net SupportClass.cs new System.Threading.Thread(Start) Link To Source File
lucene.net SupportClass.cs new System.Threading.Thread(Start) Link To Source File
lucene.net TestSpellChecker.cs new Thread(run) Link To Source File
lucene.net TestSupportClass.cs new Thread(fxn) Link To Source File
Terraria-Map-Generator MapGeneratorForm.cs new Thread(new ThreadStart(GenerateWorker)) Link To Source File
Ani-Me Misc.cs new System.Threading.Thread(() => result = F()) Link To Source File
Ani-Me Misc.cs new Thread(() => { try { Log("Making New Notification"); ni = new UI.NotifyPopup(); Log("Showing NEw notification with " + string.Format("{0} Duration {1} Title {2} Message {3} Priority", QueueItem.Duration, QueueItem.Title, QueueItem.Message, QueueItem.Priority)); ni.Show(QueueItem.Duration, QueueItem.Title, QueueItem.Message); Log("Hooking Notification Invoke"); ni.Closed += (sender, e) => ni.Dispatcher.InvokeShutdown(); Log("Running Dispatcher"); Dispatcher.Run(); Log("Unhooking Notification Invoke"); ni.Closed -= (sender, e) => ni.Dispatcher.InvokeShutdown(); } catch (Exception ex) { Log(ex.TargetSite + " - " + ex.Source + " - " + ex.Message); } }) Link To Source File
Ani-Me Misc.cs new Thread(() => { while (true) { if (NotifyQueue.Count > 0) { UI.NotifyQueueItem n = NotifyQueue.Dequeue(); Log("Spawning New Notification Thread"); Thread t = new Thread(() => { try { Log("Making New Notification"); ni = new UI.NotifyPopup(); Log("Showing NEw notification with " + string.Format("{0} Duration {1} Title {2} Message {3} Priority", n.Duration, n.Title, n.Message,n.Priority)); ni.Show(n.Duration, n.Title, n.Message); Log("Hooking Notification Invoke"); ni.Closed += (sender, e) => ni.Dispatcher.InvokeShutdown(); Log("Running Dispatcher"); Dispatcher.Run(); Log("Unhooking Notification Invoke"); ni.Closed -= (sender, e) => ni.Dispatcher.InvokeShutdown(); } catch (Exception ex) { Log(ex.TargetSite + " - " + ex.Source + " - " + ex.Message); } }); t.SetApartmentState(ApartmentState.STA); Log("Starting Notification Thread"); t.Start(); Log("Sleeping Notification Queue Processor Thread for " + (n.Duration + (int)TimeSpan.FromSeconds(0.8).TotalMilliseconds) + " Milliseconds"); Thread.Sleep((n.Duration + (int)TimeSpan.FromSeconds(0.8).TotalMilliseconds)); t.Abort(); } else { Thread.Sleep(2000); } } }) Link To Source File
Ani-Me Misc.cs new Thread(() => { try { Log("Making New Notification"); ni = new UI.NotifyPopup(); Log("Showing NEw notification with " + string.Format("{0} Duration {1} Title {2} Message {3} Priority", n.Duration, n.Title, n.Message,n.Priority)); ni.Show(n.Duration, n.Title, n.Message); Log("Hooking Notification Invoke"); ni.Closed += (sender, e) => ni.Dispatcher.InvokeShutdown(); Log("Running Dispatcher"); Dispatcher.Run(); Log("Unhooking Notification Invoke"); ni.Closed -= (sender, e) => ni.Dispatcher.InvokeShutdown(); } catch (Exception ex) { Log(ex.TargetSite + " - " + ex.Source + " - " + ex.Message); } }) Link To Source File