Project Name File Name Usage Source Code Link
SystemWrapper ThreadPoolWrap.cs ThreadPool.QueueUserWorkItem(callBack, state) Link To Source File
mono-reactive ThreadPoolScheduler.cs ThreadPool.QueueUserWorkItem (s => { Thread.Sleep (Scheduler.Normalize (dueTime - Now)); if (!cancel) dis.Add (action (this, state)); }) Link To Source File
Azyotter ViewModel.cs ThreadPool.QueueUserWorkItem((state) => { Thread.Sleep(2000); disp.BeginInvoke(new Action(Application.Current.Shutdown)); }) Link To Source File
Azyotter ViewModel.cs ThreadPool.QueueUserWorkItem((state) => { Thread.Sleep(5000); disp.BeginInvoke(new Action(Application.Current.Shutdown)); }) Link To Source File
WCFQuickSamples Program.cs ThreadPool.QueueUserWorkItem(delegate { InstanceContext instanceContext = new InstanceContext(new MyClientCallback()); DuplexChannelFactory factory = new DuplexChannelFactory(instanceContext, GetBinding(), new EndpointAddress(baseAddress)); IMessage proxy = factory.CreateChannel(); proxy.AddMessage("Hello world"); Console.WriteLine("AddMessage callled"); }) Link To Source File
babelim SessionViewModel.cs // Publish the avatar ThreadPool.QueueUserWorkItem(new WaitCallback(PublishAvatar), ofd.FileName) Link To Source File
Castle.Transactions PerTransactionLifestyle_Releasing.cs ThreadPool.QueueUserWorkItem(_ => { IPerTxService perTxService; try { using (createdTx2.GetForkScope()) using (var tx2 = createdTx2.Transaction) { perTxService = scope.Service.DoWork(); // this time the ids should be different and we should only have one active transaction in this context Assert.That(perTxService.Id, Is.Not.SameAs(parentId)); Assert.That(manager.Service.Count, Is.EqualTo(1), "transaction count correct"); // tell parent it can go on and complete childStarted.Set(); Assert.That(perTxService.Disposed, Is.False); tx2.Complete(); } // perTxService.Disposed is either true or false at this point depending on the interleaving //Assert.That(perTxService.Disposed, Is.???, "becuase dependent transaction hasn't fired its parent TransactionCompleted event, or it HAS done so and it IS disposed"); } catch (Exception ex) { possibleException = ex; _Logger.Debug("child fault", ex); } finally { _Logger.Debug("child finally"); childComplete.Set(); } }) Link To Source File
Castle.Windsor-READONLY ScopedLifestyleExplicitAndMultipleThreadsTestCase.cs ThreadPool.QueueUserWorkItem(_ => { Assert.AreNotEqual(Thread.CurrentThread.ManagedThreadId, initialThreadId); instanceFromOtherThread = Container.Resolve(); @event.Set(); }) Link To Source File
Windsor ScopedLifestyleExplicitAndMultipleThreadsTestCase.cs ThreadPool.QueueUserWorkItem(_ => { Assert.AreNotEqual(Thread.CurrentThread.ManagedThreadId, initialThreadId); instanceFromOtherThread = Container.Resolve(); @event.Set(); }) Link To Source File
coapp ParallelDeflateOutputStream.cs ThreadPool.QueueUserWorkItem( _DeflateOne, workitem ) Link To Source File
devtools Core.cs ThreadPool.QueueUserWorkItem(this.SynchronousReportErrors, errorEventArguments) Link To Source File
devtools Implementations.cs ThreadPool.QueueUserWorkItem(this.ReportEditsUsingDifferentThread, editEventArguments) Link To Source File
devtools Implementations.cs ThreadPool.QueueUserWorkItem(this.ReportSymbolTableEditsUsingDifferentThread, editEventArguments) Link To Source File
dextop HelloRemotingDemo.cs ThreadPool.QueueUserWorkItem((state) => { try { Thread.Sleep(3000); var msg = new { type = "alert", msg = "This is a notification you requested 3 seconds ago." }; Remote.SendMessage(msg); } catch { } }) Link To Source File
dextop LongPollingQueueTests.cs ThreadPool.QueueUserWorkItem((s)=> { for (var i = 0; i Link To Source File
NGauge Aggregating.cs ThreadPool.QueueUserWorkItem(new WaitCallback(Worker), state) Link To Source File
NGauge Filtering.cs ThreadPool.QueueUserWorkItem(new WaitCallback(Worker), state) Link To Source File
NGauge FromFroming.cs ThreadPool.QueueUserWorkItem(new WaitCallback(Worker), state) Link To Source File
NGauge Intersecting.cs ThreadPool.QueueUserWorkItem(new WaitCallback(Worker), state) Link To Source File
NGauge PLINQBench.cs ThreadPool.QueueUserWorkItem(new WaitCallback(Worker), state0) Link To Source File
NGauge Quantificating.cs ThreadPool.QueueUserWorkItem(new WaitCallback(Worker), state) Link To Source File
NGauge TaskInternals.cs ThreadPool.QueueUserWorkItem(new WaitCallback((obj) => { ((ManualResetEvent)obj).Set(); }), doneEvent) Link To Source File
NGauge Transforming.cs ThreadPool.QueueUserWorkItem(new WaitCallback(Worker), state) Link To Source File
NGauge TreeTraversing.cs ThreadPool.QueueUserWorkItem(new WaitCallback(Worker), state) Link To Source File
Tempest ClientBase.cs ThreadPool.QueueUserWorkItem (now => Disconnect ((bool)now), true) Link To Source File
Tempest ClientBase.cs ThreadPool.QueueUserWorkItem (now => Disconnect ((bool)now), true) Link To Source File
Tempest NetworkClientConnection.cs ThreadPool.QueueUserWorkItem (s => { SocketAsyncEventArgs args; bool connected; Trace.WriteLineIf (NTrace.TraceVerbose, String.Format ("Waiting for pending ({0}) async..", this.pendingAsync), String.Format ("{2}:{3} {4}:ConnectAsync({0},{1})", endpoint, messageTypes, this.typeName, connectionId, c)); while (this.pendingAsync > 0 || Interlocked.CompareExchange (ref this.connectCompletion, ntcs, null) != null) Thread.Sleep (0); lock (this.stateSync) { if (IsConnected) throw new InvalidOperationException ("Already connected"); RemoteEndPoint = endpoint; args = new SocketAsyncEventArgs(); args.RemoteEndPoint = endpoint; args.Completed += ConnectCompleted; this.reliableSocket = new Socket (AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); int p = Interlocked.Increment (ref this.pendingAsync); Trace.WriteLineIf (NTrace.TraceVerbose, String.Format ("Increment pending: {0}", p), String.Format ("{2}:{3} {4}:ConnectAsync({0},{1})", endpoint, messageTypes, this.typeName, connectionId, c)); connected = !this.reliableSocket.ConnectAsync (args); } if (connected) { Trace.WriteLineIf (NTrace.TraceVerbose, "Connected synchronously", String.Format ("{2}:{3} {4}:ConnectAsync({0},{1})", endpoint, messageTypes, this.typeName, connectionId, c)); ConnectCompleted (this.reliableSocket, args); } else Trace.WriteLineIf (NTrace.TraceVerbose, "Connecting asynchronously", String.Format ("{2}:{3} {4}:ConnectAsync({0},{1})", endpoint, messageTypes, this.typeName, connectionId, c)); }) Link To Source File
Tempest NetworkConnection.cs ThreadPool.QueueUserWorkItem (s => { Trace.WriteLineIf (NTrace.TraceVerbose, String.Format ("Async DC waiting for pending ({0}) async.", pendingAsync), String.Format ("{2}:{4} {3}:Disconnect({0},{1})", now, reason, this.typeName, c, connectionId)); while (this.pendingAsync > 2) // Disconnect is pending. Thread.Sleep (0); Trace.WriteLineIf (NTrace.TraceVerbose, "Finished waiting, disconnecting async.", String.Format ("{2}:{4} {3}:Disconnect({0},{1})", now, reason, this.typeName, c, connectionId)); #if !SILVERLIGHT var args = new SocketAsyncEventArgs();// { DisconnectReuseSocket = true }; args.Completed += OnDisconnectCompleted; if (!this.reliableSocket.DisconnectAsync (args)) OnDisconnectCompleted (this.reliableSocket, args); #else this.reliableSocket.Close(); #endif }) Link To Source File
Tempest ConnectionProviderTests.cs ThreadPool.QueueUserWorkItem (o => c.Send (new MockMessage { Content = content })) Link To Source File
Tempest MockConnectionProvider.cs ThreadPool.QueueUserWorkItem (s => OnDisconnected ((DisconnectedEventArgs)s), e) Link To Source File
SharpDevelop FxCopWrapper.cs // Start the thread: System.Threading.ThreadPool.QueueUserWorkItem(RunGetRuleList, new Request(ruleAssemblies, callback)) Link To Source File
SharpDevelop Task.cs ThreadPool.QueueUserWorkItem(t.Run, null) Link To Source File
SharpDevelop RecentProjectsControl.xaml.cs // When building the project list we access the .sln files (to see if they still exist). // Because those might be stored on a slow network drive, we do this on a background thread so that // SharpDevelop startup doesn't have to wait. ThreadPool.QueueUserWorkItem(AsyncBuildRecentProjectList, FileService.RecentOpen.RecentProject.ToArray()) Link To Source File
SharpDevelop CustomTool.cs System.Threading.ThreadPool.QueueUserWorkItem( delegate { try { action(); } catch (Exception ex) { MessageService.ShowException(ex); } finally { CustomToolsService.NotifyAsyncFinish(this); } }) Link To Source File
NETGen Main.cs System.Threading.ThreadPool.QueueUserWorkItem( delegate(object o) { FruchtermanReingoldLayout layout = new FruchtermanReingoldLayout(15); NETGen.Visualization.NetworkVisualizer.Start(hierarchy, layout, c, 800, 600); layout.DoLayoutAsync(); Logger.ShowInfos = false; while(true) { Change(); c.RecomputeColors(new Func(v => { if (((NodeType)v.Tag) == NodeType.Aggregate) { if(v.OutDegree==0) return Color.White; else return Color.Black; } else return c[v]; })); c.RecomputeColors(new Func(e => { if (((NodeType)e.Target.Tag) == NodeType.Aggregate && e.Target.OutDegree==0) return Color.White; else return c.DefaultEdgeColor; })); NetworkVisualizer.Layout.DoLayout(); } }) Link To Source File
NETGen TwitterStream.cs System.Threading.ThreadPool.QueueUserWorkItem(new System.Threading.WaitCallback(process), text) Link To Source File
NETGen Network.cs System.Threading.ThreadPool.QueueUserWorkItem(new System.Threading.WaitCallback(delegate { OnVertexAdded(v); }), null) Link To Source File
MiniTwitter-Mod TextViewer.xaml.cs ThreadPool.QueueUserWorkItem(tag => { var url = (string)tag; string url2 = url; //goo.gl反解析 if (Regex.IsMatch(url, @"http://goo/.gl//([A-Za-z0-9/]+?)")) { var gh = MiniTwitter.Net.TwitterClient.googlHelper; url2 = gh.GetOriginalUrl(url); if (Settings.Default.AntiShortUrlTracking && url2 != url) { this.Invoke(() => hyperlink.Tag = url2); } } if (Regex.IsMatch(url, @"http://((bit/.ly)|(j/.mp))/[A-Za-z0-9]+?")) { url2 = MiniTwitter.Net.BitlyHelper.ConvertFrom(url); if (Settings.Default.AntiShortUrlTracking && url2 != url) { this.Invoke(() => hyperlink.Tag = url2); } } if (Regex.IsMatch(url, @"http://cli/.gs/[A-Za-z0-9]+")) { try { url2 = (new WebClient()).DownloadString("http://cli.gs/api/v1/cligs/expand?clig=" + url); } catch { url2 = url; } } try { var location = GetRedirect(url2); if ((!location.IsNullOrEmpty() && location != url) || redirectFailCount > 5) this.Invoke(() => { hyperlink.ToolTip = new TextBlock { Text = location }; hyperlink.Tag = location; //无论如何都防止产生两次点击 }); else this.Invoke(() => { redirectFailCount++; hyperlink.ToolTip = url; }); } catch { } }, hyperlink.Tag) Link To Source File
MiniTwitter-Mod MainWindow.xaml.cs ThreadPool.QueueUserWorkItem(state => RefreshTimeline((RefreshTarget)state), target) Link To Source File
MiniTwitter-Mod MainWindow.xaml.cs ThreadPool.QueueUserWorkItem(text => { TClient.Update((string)text, ReplyID, _latitude, _longitude, stp => { if (stp != OAuthBase.ProccessStep.Error) App.MainTokenSource.Token.ThrowIfCancellationRequested(); }); }, status) Link To Source File
MiniTwitter-Mod MainWindow.xaml.cs ThreadPool.QueueUserWorkItem(p => { var id = (ulong)p; var itm = TClient.GetStatusFromCache(id); var _status = TClient.ReTweet(id); if (_status != null) { this.Invoke(() => StatusText = string.Format("ReTweet已成功 (共{0}次RT)", (itm.ReTweetedStatus ?? itm).ReTweetCount ?? "0")); this.Invoke(() => { itm.ID = _status.ID; itm.Text = _status.Text; itm.Source = _status.Source; itm.Sender = _status.Sender; itm.Favorited = _status.Favorited; itm.InReplyToStatusID = _status.InReplyToStatusID; itm.ReTweetedStatus = _status.ReTweetedStatus; Timelines.RefreshAll(); }); } else { ulong? inReplyToID = null; string inReplyToName = null; if (Settings.Default.IsRetweetWithInReplyTo) { inReplyToID = itm.ID; inReplyToName = itm.Sender.ScreenName; } this.Invoke(() => { StatusText = "ReTweet失败!"; FailStatuses.Add(new MainWindowState(inReplyToID, inReplyToName, "RT @" + itm.Sender.ScreenName + " " + itm.Text, itm.ID)); }); } }, RetweetStatusID.Value) Link To Source File
MiniTwitter-Mod MainWindow.xaml.cs ThreadPool.QueueUserWorkItem(p => { var itm = (Status)p; var status = TClient.ReTweet(itm.ID); if (status != null) { this.Invoke(() => StatusText = string.Format("ReTweet已成功 (共{0}次RT)", (itm.ReTweetedStatus ?? itm).ReTweetCount ?? "0")); this.Invoke(() => { itm.ID = status.ID; itm.Text = status.Text; itm.Source = status.Source; itm.Sender = status.Sender; itm.Favorited = status.Favorited; itm.InReplyToStatusID = status.InReplyToStatusID; itm.ReTweetedStatus = status.ReTweetedStatus; Timelines.RefreshAll(); }); } else { ulong? inReplyToID = null; string inReplyToName = null; if (Settings.Default.IsRetweetWithInReplyTo) { inReplyToID = itm.ID; inReplyToName = itm.Sender.ScreenName; } this.Invoke(() => { StatusText = "ReTweet失败!"; FailStatuses.Add(new MainWindowState(inReplyToID, inReplyToName, "RT @" + itm.Sender.ScreenName + " " + itm.Text, itm.ID)); }); } }, item) Link To Source File
MiniTwitter-Mod MainWindow.xaml.cs ThreadPool.QueueUserWorkItem(state => { var item = (ITwitterItem)state; if (!TClient.Delete(item)) { return; } // タイムラインの項目も削除する Timelines.Remove(item); //TODO:如果是自己Retweet的推就把原先应该出现的推放回TL }, twitterItem) Link To Source File
MiniTwitter-Mod MainWindow.xaml.cs ThreadPool.QueueUserWorkItem(state => { var item = (Status)state; if (TClient.Favorite(item)) { // お気に入りを切り替える this.Invoke(() => item.Favorited = !item.Favorited); } }, twitterItem) Link To Source File
MiniTwitter-Mod MainWindow.xaml.cs ThreadPool.QueueUserWorkItem(state => { this.Invoke(p => timeline.Update(p), TClient.Search(timeline.Tag, timeline.SinceID)); }) Link To Source File
MiniTwitter-Mod MainWindow.xaml.cs ThreadPool.QueueUserWorkItem(state => { this.Invoke(p => timeline.Update(p), TClient.GetListStatuses(timeline.Tag, timeline.SinceID)); }) Link To Source File
MiniTwitter-Mod MainWindow.xaml.cs ThreadPool.QueueUserWorkItem(state => { this.Invoke(p => timeline.Update(p), TClient.Search(timeline.Tag, timeline.SinceID)); }) Link To Source File
MiniTwitter-Mod MainWindow.xaml.cs ThreadPool.QueueUserWorkItem(state => { this.Invoke(p => timeline.Update(p), TClient.GetListStatuses(timeline.Tag, timeline.SinceID)); }) Link To Source File
MiniTwitter-Mod MainWindow.xaml.cs ThreadPool.QueueUserWorkItem(state => { var url = (string)state; var shorten = Settings.Default.UseBitlyPro?BitlyHelper.ConvertTo(url): MiniTwitter.Net.TwitterClient.googlHelper.ShortenUrl(url); this.Invoke(targetUrl => { var index = TweetTextBox.Text.IndexOf(url); TweetTextBox.Text = TweetTextBox.Text.Replace(url, shorten); TweetTextBox.CaretIndex = index + shorten.Length; StatusText = "缩短URL完成"; }, shorten); }, text) Link To Source File
MiniTwitter-Mod MainWindow.xaml.cs ThreadPool.QueueUserWorkItem(tl => { this.Invoke(()=> Timelines.Remove(leavetl)); }) Link To Source File
MiniTwitter-Mod MainWindow.xaml.cs ThreadPool.QueueUserWorkItem(stat => { var status_tmp = (Status)stat; var tmpId = status_tmp.InReplyToStatusID; var repliedStatus = TClient.GetStatus(tmpId); if (repliedStatus == null) return; repliedStatus.MentionStatus = status_tmp; this.Invoke(() => { Timelines.Update(new[] { repliedStatus }); ulong? tmpId2 = In_Reply_To_Status_Id; In_Reply_To_Status_Id = tmpId; InReplyToCommand_Executed(sender, e); In_Reply_To_Status_Id = tmpId2; }); }, status) Link To Source File
MiniTwitter-Mod MainWindow.xaml.cs ThreadPool.QueueUserWorkItem(state => { this.Invoke(p => timeline.Update(p), Timelines.Where(tl => tl.Type == TimelineType.Recent).Single().Items); this.Invoke(() => timeline.Sort(Settings.Default.SortCategory, Settings.Default.SortDirection)); }) Link To Source File
MiniTwitter-Mod MainWindow.xaml.cs ThreadPool.QueueUserWorkItem(state => { if (!TClient.CreateFollow((string)state)) { this.Invoke(() => StatusText = "跟随用户失败(被block?)"); } }, ((Status)e.Parameter).Sender.ScreenName) Link To Source File
MiniTwitter-Mod MainWindow.xaml.cs ThreadPool.QueueUserWorkItem(state => { if (!TClient.CreateFollow((string)state)) { this.Invoke(() => StatusText = "跟随用户失败(被block?)"); } }, e.Parameter) Link To Source File
MiniTwitter-Mod MainWindow.xaml.cs ThreadPool.QueueUserWorkItem(state => { var user = (User)state; if (TClient.DeleteFollow(user.ScreenName)) { this.Invoke(() => Timelines.RemoveAll(p => p.Sender.ID == user.ID)); } else { this.Invoke(() => StatusText = "取消跟随用户失败(网络错误?)"); } }, ((Status)e.Parameter).Sender) Link To Source File
MiniTwitter-Mod MainWindow.xaml.cs ThreadPool.QueueUserWorkItem(state => { if (TClient.DeleteFollow((string)state)) { this.Invoke(() => Timelines.RemoveAll(p => p.Sender.ScreenName == (string)state)); } else { this.Invoke(() => StatusText = "取消跟随用户失败(网络错误?)"); } }, e.Parameter) Link To Source File
MiniTwitter-Mod MainWindow.xaml.cs ThreadPool.QueueUserWorkItem(state => { var user = (User)state; if (TClient.CreateBlock(user.ScreenName)) { this.Invoke(() => Timelines.RemoveAll(p => p.Sender.ID == user.ID)); } else { this.Invoke(() => StatusText = "阻止用户失败"); } }, ((Status)e.Parameter).Sender) Link To Source File
MiniTwitter-Mod MainWindow.xaml.cs ThreadPool.QueueUserWorkItem(state => { if (TClient.CreateBlock((string)state)) { this.Invoke(() => Timelines.RemoveAll(p => p.Sender.ScreenName == (string)state)); } else { this.Invoke(() => StatusText = "阻止用户失败"); } }, e.Parameter) Link To Source File
MiniTwitter-Mod MainWindow.xaml.cs ThreadPool.QueueUserWorkItem(state => { this.Invoke(p => timeline.Update(p), TClient.Search(timeline.Tag, timeline.SinceID)); }) Link To Source File
MiniTwitter-Mod MainWindow.xaml.cs ThreadPool.QueueUserWorkItem(rtl => { //TODO:刷新旧推 Timeline reftl = (Timeline)rtl; ITwitterItem[] statusesToUpdate = Statuses.Empty; if (reftl.RecentTweetCount<800) switch (reftl.Type) { case TimelineType.Unknown: break; case TimelineType.Recent: statusesToUpdate = (TClient.GetHomeTimeline(count: 200, maxId: reftl.MaxID)); break; case TimelineType.Replies: statusesToUpdate = (TClient.GetMentions(count: 200, maxId: reftl.MaxID)); break; case TimelineType.Archive: statusesToUpdate = (TClient.GetUserTimeline(TClient.LoginedUser.ScreenName, count: 200, maxId: reftl.MaxID)); break; case TimelineType.Message: break; case TimelineType.User: reftl= Timelines.Where(t => t.Type == TimelineType.Recent).Single(); if (reftl.RecentTweetCount < 800) statusesToUpdate = (TClient.GetHomeTimeline(count: 200, maxId: reftl.MaxID)); break; case TimelineType.Search: break; case TimelineType.List: break; case TimelineType.OtherUser: statusesToUpdate = (TClient.GetUserTimeline(reftl.Tag, count: 200, maxId: reftl.MaxID)); break; default: break; } //statusesToUpdate = statusesToUpdate ?? Statuses.Empty; if (statusesToUpdate != null && statusesToUpdate.Length < 50) reftl.RecentTweetCount = 800; else reftl.RecentTweetCount += (statusesToUpdate ?? Statuses.Empty).Length; if ((statusesToUpdate ?? Statuses.Empty).Length != 0) this.AsyncInvoke(() => reftl.Update(statusesToUpdate)); Interlocked.Exchange(ref Updating, 0); //Updating = false; },tl) Link To Source File
MiniTwitter-Mod MainWindow.xaml.cs ThreadPool.QueueUserWorkItem(state => { var user = (User)state; if (TClient.ReportSpam(user.ScreenName)) { this.Invoke(() => Timelines.RemoveAll(p => p.Sender.ID == user.ID)); } else { this.Invoke(() => StatusText = "报告广告账户失败"); } }, ((Status)e.Parameter).Sender) Link To Source File
MiniTwitter-Mod MainWindow.xaml.cs ThreadPool.QueueUserWorkItem(state => { var username = (string)state; if (TClient.ReportSpam(username)) { this.Invoke(() => Timelines.RemoveAll(p => p.Sender.ScreenName == username)); } else { this.Invoke(() => StatusText = "报告广告账户失败"); } }, e.Parameter) Link To Source File
MiniTwitter-Mod MainWindow.xaml.cs ThreadPool.QueueUserWorkItem(id => { var tmpId = (ulong?)id; var repliedStatus = TClient.GetStatus(tmpId.Value); if (repliedStatus == null) return; this.Invoke(() => { Timelines.Update(new[] { repliedStatus }); ulong? tmpId2 = In_Reply_To_Status_Id; In_Reply_To_Status_Id = tmpId; MoveToReplyTweetButton_Click(sender, e); In_Reply_To_Status_Id = tmpId2; }); }, In_Reply_To_Status_Id) Link To Source File
MiniTwitter-Mod MainWindow.xaml.cs ThreadPool.QueueUserWorkItem(state => { this.Invoke(p => timeline.Update(p), TClient.GetUserTimeline(timeline.Tag)); }) Link To Source File
MiniTwitter-Mod MainWindow.xaml.cs ThreadPool.QueueUserWorkItem(state => { this.Invoke(p => timeline.Update(p), TClient.GetUserTimeline(timeline.Tag)); }) Link To Source File
MiniTwitter-Mod TwitterClient.cs ThreadPool.QueueUserWorkItem(code => { result.Text = KanvasoHelper.GetLongStatus((string)code) ?? result.Text; }, match.Groups["code"].Value) Link To Source File
MiniTwitter-Mod TwitterClient.cs ThreadPool.QueueUserWorkItem(code => { item.Text = KanvasoHelper.GetLongStatus((string)code) ?? item.Text; }, match.Groups["code"].Value) Link To Source File
MiniTwitter-Mod TwitterClient.cs ThreadPool.QueueUserWorkItem(s => action((T)s), state) Link To Source File
MiniTwitter-Mod User.cs ThreadPool.QueueUserWorkItem(state => { try { using (var client = new WebClient()) { client.CachePolicy = new System.Net.Cache.RequestCachePolicy(System.Net.Cache.RequestCacheLevel.Revalidate); var data = client.DownloadData(i); var stream = new MemoryStream(data); var bitmap = new BitmapImage(); bitmap.BeginInit(); bitmap.StreamSource = stream; bitmap.DecodePixelHeight = 48; bitmap.DecodePixelWidth = 48; bitmap.EndInit(); bitmap.Freeze(); lock (_iconCache) { _iconCache[i] = bitmap; } System.Windows.Application.Current.AsyncInvoke(p => { Icon = p; lock (_processUsers) { List users; if (_processUsers.TryGetValue(i, out users)) { foreach (var item in users) { item.Icon = p; } _processUsers.Remove(i); } } }, bitmap, System.Windows.Threading.DispatcherPriority.Background); } } catch { lock (_iconCache) { _iconCache.Remove(i); _retry++; } } }) Link To Source File
OCTGN Server.cs ThreadPool.QueueUserWorkItem(delegate { while (!_shutdownInProgress) { try { Socket acceptedSocket = _socket.Accept(); ThreadPool.QueueUserWorkItem(delegate { if (!_shutdownInProgress) { var conn = new Connection( this, acceptedSocket); if ( conn. WaitForRequestBytes () == 0) { conn. WriteErrorAndClose (400); return; } Host host = GetHostAndInjectAssemblies (); if (host == null) { conn. WriteErrorAndClose (500); return; } IncrementRequestCount(); host.ProcessRequest( conn); } }); } catch { Thread.Sleep(100); } } }) Link To Source File
OCTGN Server.cs ThreadPool.QueueUserWorkItem(delegate { while (!_shutdownInProgress) { try { Socket acceptedSocket = _socket.Accept(); ThreadPool.QueueUserWorkItem(delegate { if (!_shutdownInProgress) { var conn = new Connection( this, acceptedSocket); if ( conn. WaitForRequestBytes () == 0) { conn. WriteErrorAndClose (400); return; } Host host = GetHost(); if (host == null) { conn. WriteErrorAndClose (500); return; } IncrementRequestCount(); host.ProcessRequest( conn); } }); } catch { Thread.Sleep(100); } } }) Link To Source File
OCTGN SetList.xaml.cs ThreadPool.QueueUserWorkItem(_ => { int current = 0, max = ofd.FileNames.Length; wnd.UpdateProgress(current, max, null, false); foreach (string setName in ofd.FileNames) { ++current; string shortName = Path.GetFileName(setName); try { if (shortName != null) { string copyto = Path.Combine(path, shortName); if (setName.ToLower() != copyto.ToLower()) File.Copy(setName, copyto, true); SelectedGame.InstallSet(copyto); } wnd.UpdateProgress(current, max, string.Format("'{0}' installed.", shortName), false); } catch (Exception ex) { wnd.UpdateProgress(current, max, string.Format( "'{0}' an error occured during installation:", shortName), true); wnd.UpdateProgress(current, max, ex.Message, true); } } }) Link To Source File
OCTGN Engine.cs ThreadPool.QueueUserWorkItem(Execute, job) Link To Source File
OCTGN CardDlg.xaml.cs ThreadPool.QueueUserWorkItem(searchObj => { var search = (string) searchObj; List filtered = _allCards.Where( m => m.Name.IndexOf(search, StringComparison.CurrentCultureIgnoreCase) >= 0) .ToList(); if (search == _filterText) Dispatcher.Invoke(new Action(() => allList.ItemsSource = filtered)); }, _filterText) Link To Source File
Fracture Future.cs ThreadPool.QueueUserWorkItem(FutureHelpers.RunInThreadHelper, thunk) Link To Source File
Fracture Future.cs ThreadPool.QueueUserWorkItem(FutureHelpers.RunInThreadHelper, thunk) Link To Source File
Fracture Future.cs ThreadPool.QueueUserWorkItem(FutureHelpers.RunInThreadHelper, thunk) Link To Source File
Fracture IO.cs ThreadPool.QueueUserWorkItem(wc, _Stream) Link To Source File
Fracture Util.cs ThreadPool.QueueUserWorkItem(moveNext, f) Link To Source File
Fracture IOTests.cs ThreadPool.QueueUserWorkItem((_) => { try { StreamA.Write(buf, 0, buf.Length); f.Complete(); } catch (Exception ex) { f.Fail(ex); } }, null) Link To Source File
OrchardApp Starter.cs ThreadPool.QueueUserWorkItem( state => { try { var result = _initialization(application); _initializationResult = result; } catch (Exception e) { lock (_synLock) { _error = e; _previousError = null; } } finally { // Execute pending requests as the initialization is over WarmupHttpModule.SignalWarmupDone(); } }) Link To Source File
KMLib ParallelSmoFanSolver2.cs ThreadPool.QueueUserWorkItem(maxPairsWaitCallbacks[i], maxPairThreadsData[i]) Link To Source File
KMLib ParallelSmoFanSolver2.cs ThreadPool.QueueUserWorkItem(minPairsWaitCallbacks[i], minPairThreadsData[i]) Link To Source File
lokad-cloud MainForm.cs // Do this asynchronously because it requires a few seconds ThreadPool.QueueUserWorkItem(s => { using(var input = (Bitmap)Bitmap.FromFile(_currentFileName)) { var slices = Helpers.SliceBitmapAsPng(input, 14); // Queue slices _mapReduceJob.PushItems(new HistogramMapReduceFunctions(), slices, 4); //_currentHistogram = Helpers.ComputeHistogram(input); //_pnlHistogram.Refresh(); } BeginInvoke(new Action(() => _timer.Start())); }) Link To Source File
lokad-cloud WaitFor.cs ThreadPool.QueueUserWorkItem(watcher, Thread.CurrentThread) Link To Source File
lokad-cloud-storage ParallelExtensions.cs ThreadPool.QueueUserWorkItem(worker, i) Link To Source File
LoreSoft.Shared Messenger.cs ThreadPool.QueueUserWorkItem(m => Publish((TMessage)m), message) Link To Source File
taco Wilson.cs ThreadPool.QueueUserWorkItem(_ => { try { var href = "?flip=left"; if (request.GET["flip"] == "left") { wilson = wilson.Split(new[] {Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries) .Select(line => new string(line.Reverse().ToArray())) .Aggregate("", (agg, line) => agg + line + Environment.NewLine); href = "?flip=right"; } response.Finish((fault2, complete) => TimerLoop(350, fault2, () => response.Write("Hutchtastic"), () => response.Write("
"),

                            () => response.Write(wilson),

                            () => response.Write("
"), () => { if (request.GET["flip"] == "crash") { throw new ApplicationException("Wilson crashed!"); } }, () => response.Write("

flip!

"), () => response.Write("

crash!

"), complete)); } catch (Exception ex) { fault(ex); } })
Link To Source File
DistAppLog AppLogClient.cs ThreadPool.QueueUserWorkItem(new WaitCallback(ThreadSend), message) Link To Source File
DistAppLog AppLogClient.cs ThreadPool.QueueUserWorkItem(new WaitCallback(ThreadSend), message) Link To Source File
DistAppLog AppLogClient.cs ThreadPool.QueueUserWorkItem(new WaitCallback(ThreadSend), message) Link To Source File
DistAppLog AppLogClient.cs ThreadPool.QueueUserWorkItem(new WaitCallback(ThreadSend), message) Link To Source File
DistAppLog AppLogClient.cs ThreadPool.QueueUserWorkItem(new WaitCallback(ThreadSend), message) Link To Source File
DistAppLog AppLogClient.cs ThreadPool.QueueUserWorkItem(new WaitCallback(ThreadSend), message) Link To Source File
EasyNetQ ScheduleRepository.cs // mark items for purge on a background thread. ThreadPool.QueueUserWorkItem(state => WithStoredProcedureCommand(markForPurgeSql, command => { var purgeDate = now().AddDays(configuration.PurgeDelayDays); command.Parameters.AddWithValue("@purgeDate", purgeDate); var idParameter = command.Parameters.Add("@ID", SqlDbType.Int); foreach (var scheduleMessageId in scheuldeMessageIds) { idParameter.Value = scheduleMessageId; command.ExecuteNonQuery(); } }) ) Link To Source File
orchard Starter.cs ThreadPool.QueueUserWorkItem( state => { try { var result = _initialization(application); _initializationResult = result; } catch (Exception e) { lock (_synLock) { _error = e; _previousError = null; } } finally { // Execute pending requests as the initialization is over WarmupHttpModule.SignalWarmupDone(); } }) Link To Source File
monodevelop ConnectionSettingsWidget.cs ThreadPool.QueueUserWorkItem (new WaitCallback (RefreshClickedThreaded), settingsCopy) Link To Source File
monodevelop ConnectionSettingsWidget.cs ThreadPool.QueueUserWorkItem (new WaitCallback (TestClickedThreaded), settingsCopy) Link To Source File
monodevelop ConnectionContextNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (BuildChildNodesThreaded), dataObject) Link To Source File
monodevelop ConnectionContextNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (OnDropDatabaseThreaded), CurrentNode.DataItem) Link To Source File
monodevelop TablesNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (BuildChildNodesThreaded), dataObject) Link To Source File
monodevelop TablesNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (OnCreateTableThreaded), new object[] {schemaProvider, table, node} as object) Link To Source File
monodevelop ViewsNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (BuildChildNodesThreaded), dataObject) Link To Source File
monodevelop ViewsNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (OnCreateViewThreaded), new object[] {schemaProvider, view, node} as object) Link To Source File
monodevelop ProceduresNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (BuildChildNodesThreaded), dataObject) Link To Source File
monodevelop ProceduresNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (OnCreateProcedureThreaded), new object[] {schemaProvider, proc, node} as object) Link To Source File
monodevelop UsersNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (BuildChildNodesThreaded), dataObject) Link To Source File
monodevelop UsersNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (OnCreateUserThreaded), new object[] {schemaProvider, user, node} as object) Link To Source File
monodevelop ConstraintsNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (BuildChildNodesThreaded), dataObject) Link To Source File
monodevelop TableNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (BuildChildNodesThreaded), dataObject) Link To Source File
monodevelop TableNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (RenameItemThreaded), new object[]{ node, newName }) Link To Source File
monodevelop TableNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (OnSelectColumnsCommandGetColumns), CurrentNode.DataItem) Link To Source File
monodevelop TableNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (OnDropTableThreaded), CurrentNode.DataItem) Link To Source File
monodevelop TableNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (OnAlterTableThreaded), CurrentNode.DataItem) Link To Source File
monodevelop UserNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (RenameItemThreaded), new object[]{ node, newName }) Link To Source File
monodevelop UserNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (OnAlterUserThreaded), CurrentNode.DataItem) Link To Source File
monodevelop UserNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (OnDropUserThreaded), CurrentNode.DataItem) Link To Source File
monodevelop ProcedureNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (BuildChildNodesThreaded), dataObject) Link To Source File
monodevelop ProcedureNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (RenameItemThreaded), new object[]{ node, newName }) Link To Source File
monodevelop ProcedureNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (OnAlterProcedureThreaded), alterProc) Link To Source File
monodevelop ProcedureNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (OnDropProcedureThreaded), CurrentNode.DataItem) Link To Source File
monodevelop ViewNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (BuildChildNodesThreaded), dataObject) Link To Source File
monodevelop ViewNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (RenameItemThreaded), new object[]{ node, newName }) Link To Source File
monodevelop ViewNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (OnAlterViewThreaded), CurrentNode.DataItem) Link To Source File
monodevelop ViewNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (OnDropViewThreaded), CurrentNode.DataItem) Link To Source File
monodevelop ColumnNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (BuildChildNodesThreaded), dataObject) Link To Source File
monodevelop ColumnsNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (BuildChildNodesThreaded), dataObject) Link To Source File
monodevelop AggregatesNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (BuildChildNodesThreaded), dataObject) Link To Source File
monodevelop GroupsNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (BuildChildNodesThreaded), dataObject) Link To Source File
monodevelop LanguagesNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (BuildChildNodesThreaded), dataObject) Link To Source File
monodevelop OperatorsNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (BuildChildNodesThreaded), dataObject) Link To Source File
monodevelop RolesNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (BuildChildNodesThreaded), dataObject) Link To Source File
monodevelop RulesNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (BuildChildNodesThreaded), dataObject) Link To Source File
monodevelop SequencesNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (BuildChildNodesThreaded), dataObject) Link To Source File
monodevelop TriggersNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (BuildChildNodesThreaded), dataObject) Link To Source File
monodevelop TypesNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (BuildChildNodesThreaded), dataObject) Link To Source File
monodevelop ParametersNodeBuilder.cs ThreadPool.QueueUserWorkItem (new WaitCallback (BuildChildNodesThreaded), dataObject) Link To Source File
monodevelop AbstractPooledDbConnection.cs ThreadPool.QueueUserWorkItem (new WaitCallback (ExecuteNonQueryThreaded), internalState) Link To Source File
monodevelop AbstractPooledDbConnection.cs ThreadPool.QueueUserWorkItem (new WaitCallback (ExecuteScalarThreaded), internalState) Link To Source File
monodevelop AbstractPooledDbConnection.cs ThreadPool.QueueUserWorkItem (new WaitCallback (ExecuteReaderThreaded), internalState) Link To Source File
monodevelop AbstractPooledDbConnection.cs ThreadPool.QueueUserWorkItem (new WaitCallback (ExecuteSetThreaded), internalState) Link To Source File
monodevelop AbstractPooledDbConnection.cs ThreadPool.QueueUserWorkItem (new WaitCallback (ExecuteTableThreaded), internalState) Link To Source File
monodevelop QueryService.cs ThreadPool.QueueUserWorkItem (new WaitCallback (EnsureConnectionThreaded), internalState) Link To Source File
monodevelop GdbSession.cs ThreadPool.QueueUserWorkItem (delegate { Thread.Sleep (BreakEventUpdateNotifyDelay - span); List copy; lock (breakUpdates) { copy = new List (breakUpdates.Values); breakUpdates.Clear (); breakUpdateEventsQueued = false; lastBreakEventUpdate = DateTime.Now; } foreach (WaitCallback wc in copy) wc (null); }) Link To Source File
monodevelop GdbSession.cs ThreadPool.QueueUserWorkItem (delegate { OnTargetOutput (false, line + "/n"); }) Link To Source File
monodevelop DebuggerController.cs ThreadPool.QueueUserWorkItem (delegate { try { debugger.Exit (); lock (elock) { Monitor.PulseAll (elock); } } catch { // Ignore } }) Link To Source File
monodevelop DebuggerServer.cs ST.ThreadPool.QueueUserWorkItem (delegate { ST.Thread.Sleep (BreakEventUpdateNotifyDelay - span); List copy; lock (breakUpdates) { copy = new List (breakUpdates.Values); breakUpdates.Clear (); breakUpdateEventsQueued = false; lastBreakEventUpdate = DateTime.Now; } foreach (ST.WaitCallback wc in copy) wc (null); }) Link To Source File
monodevelop DebuggerServer.cs // Execute queued work in another thread with a small delay // since it is not safe to execute it here System.Threading.ThreadPool.QueueUserWorkItem (delegate { System.Threading.Thread.Sleep (50); bool resume = false; lock (debugger) { foreach (ST.WaitCallback cb in stoppedWorkQueue) { cb (null); } stoppedWorkQueue.Clear (); } if (resume) guiManager.Continue (process.MainThread); else if (notifyToClient) NotifyTargetEvent (thread, args); }) Link To Source File
monodevelop SshOperation.cs ThreadPool.QueueUserWorkItem (delegate { try { ssh.Connect (); RunOperations (); Success = true; } catch (Exception ex) { Success = false; LoggingService.LogError ("Error in ssh operation", ex); } finally { try { if (ssh.Connected) ssh.Close (); } catch (Exception ex) { LoggingService.LogError ("Error disconnecting from ssh", ex); Success = false; } } IsCompleted = true; wait.Set (); if (Completed != null) Completed (this); }) Link To Source File
monodevelop PythonSite.cs ThreadPool.QueueUserWorkItem (delegate { using (var writer = new StreamWriter (File.OpenWrite (m_pathsPath))) { foreach (var path in paths) writer.WriteLine (path); } }) Link To Source File
monodevelop PythonSite.cs ThreadPool.QueueUserWorkItem (delegate { List toParse = new List (); FindAll (path, toParse); var count = toParse.Count; var i = 0; var progress = IdeApp.Workbench.ProgressMonitors.GetBackgroundProgressMonitor ("Indexing python modules", Gtk.Stock.Execute); progress.BeginTask (String.Format ("Indexing {0}", path), count); foreach (var file in toParse) { progress.Log.WriteLine ("Parsing {0} of {1}: {2}", ++i, count, file); try { ParseFile (file); } catch (Exception ex) { progress.Log.WriteLine (ex.ToString ()); } finally { progress.Step (1); } } progress.EndTask (); progress.Dispose (); }) Link To Source File
monodevelop PythonSite.cs // Do all of our creation and data storage work // from the thread pool as it isn't critical path ThreadPool.QueueUserWorkItem (delegate { List items = new List (); string module = p.Module.FullName; if (module.EndsWith (".__init__")) module = module.Substring (0, module.Length - ".__init__".Length); items.Add (new ParserItem () { FileName = name, FullName = module, ItemType = ParserItemType.Module, Documentation = p.Module.Documentation, }); if (p.Module.Classes != null) { foreach (var klass in p.Module.Classes) { string klassname = String.Format ("{0}.{1}", module, klass.Name); items.Add (new ParserItem () { FileName = name, FullName = klassname, ItemType = ParserItemType.Class, Documentation = klass.Documentation, }); foreach (var attr in klass.Attributes) { string attrname = String.Format ("{0}.{1}", klassname, attr.Name); items.Add (new ParserItem () { FileName = name, FullName = attrname, ItemType = ParserItemType.Attribute, Documentation = attr.Documentation, }); } foreach (var func in klass.Functions) { string funcname = String.Format ("{0}.{1}", klassname, func.Name); items.Add (new ParserItem () { FileName = name, FullName = funcname, ItemType = ParserItemType.Function, Documentation = func.Documentation, }); } } if (p.Module.Functions != null) { foreach (var func in p.Module.Functions) { string funcname = String.Format ("{0}.{1}", module, func.Name); items.Add (new ParserItem () { FileName = name, FullName = funcname, ItemType = ParserItemType.Function, Documentation = func.Documentation, }); } } } m_Database.AddRange (items); }) Link To Source File
monodevelop ValaTextEditorExtension.cs ThreadPool.QueueUserWorkItem (delegate { parser.GetTypesVisibleFrom (Document.FileName, line, column, list); }) Link To Source File
monodevelop ValaTextEditorExtension.cs ThreadPool.QueueUserWorkItem (delegate { if (match.Success) { // variable initialization if (match.Groups["typename"].Success || "var" != match.Groups["typename"].Value) { // simultaneous declaration and initialization parser.GetConstructorsForType (match.Groups["typename"].Value, Document.FileName, line, column, list); } else if (match.Groups["variable"].Success) { // initialization of previously declared variable parser.GetConstructorsForExpression (match.Groups["variable"].Value, Document.FileName, line, column, list); } if (0 == list.Count) { // Fallback to known types parser.GetTypesVisibleFrom (Document.FileName, line, column, list); } } }) Link To Source File
monodevelop ValaTextEditorExtension.cs ThreadPool.QueueUserWorkItem (delegate { info.Complete (itemFullName, Document.FileName, line, column, list); }) Link To Source File
monodevelop ValaTextEditorExtension.cs ThreadPool.QueueUserWorkItem (delegate { info.GetSymbolsVisibleFrom (Document.FileName, loc.Line + 1, loc.Column + 1, list); }) Link To Source File
monodevelop MacPlatform.cs System.Threading.ThreadPool.QueueUserWorkItem (delegate { mimeTimer.BeginTiming (); try { var map = new Dictionary (); using (var file = File.OpenRead ("/etc/apache2/mime.types")) { using (var reader = new StreamReader (file)) { var mime = new Regex ("([a-zA-Z]+/[a-zA-z0-9+-_.]+)/t+([a-zA-Z]+)", RegexOptions.Compiled); string line; while ((line = reader.ReadLine ()) != null) { Match m = mime.Match (line); if (m.Success) map ["." + m.Groups [2].Captures [0].Value] = m.Groups [1].Captures [0].Value; } } } mimemap = map; } catch (Exception ex){ MonoDevelop.Core.LoggingService.LogError ("Could not load Apache mime database", ex); } mimeTimer.EndTiming (); }) Link To Source File
monodevelop SoftDebuggerSession.cs ThreadPool.QueueUserWorkItem (delegate { try { vm.Exit (0); } catch (VMDisconnectedException) { } catch (Exception ex) { LoggingService.LogError ("Error exiting SDB VM:", ex); } try { vm.Dispose (); } catch (VMDisconnectedException) { } catch (Exception ex) { LoggingService.LogError ("Error disposing SDB VM:", ex); } }) Link To Source File
monodevelop SoftDebuggerSession.cs ThreadPool.QueueUserWorkItem (delegate { try { Adaptor.CancelAsyncOperations (); // This call can block, so it has to run in background thread to avoid keeping the main session lock OnResumed (); vm.Resume (); DequeueEventsForFirstThread (); } catch (Exception ex) { if (!HandleException (ex)) OnDebuggerOutput (true, ex.ToString ()); } }) Link To Source File
monodevelop SoftDebuggerSession.cs ThreadPool.QueueUserWorkItem (delegate { try { Adaptor.CancelAsyncOperations (); // This call can block, so it has to run in background thread to avoid keeping the main session lock var req = vm.CreateStepRequest (current_thread); req.Depth = depth; req.Size = size; if (assemblyFilters != null && assemblyFilters.Count > 0) req.AssemblyFilter = assemblyFilters; req.Enabled = true; currentStepRequest = req; OnResumed (); vm.Resume (); DequeueEventsForFirstThread (); } catch (Exception ex) { LoggingService.LogError ("Next Line command failed", ex); } }) Link To Source File
monodevelop SoftDebuggerSession.cs #if DEBUG_EVENT_QUEUEING foreach (var e in dequeuing) Console.WriteLine ("dq eventset({0}): {1}", e.Count, e[0]); #endif //firing this off in a thread prevents possible infinite recursion ThreadPool.QueueUserWorkItem (delegate { if (!exited) { foreach (var es in dequeuing) { try { HandleBreakEventSet (es.ToArray (), true); } catch (VMDisconnectedException ex) { if (!HandleException (ex)) OnDebuggerOutput (true, ex.ToString ()); break; } catch (Exception ex) { if (!HandleException (ex)) OnDebuggerOutput (true, ex.ToString ()); } } } }) Link To Source File
monodevelop ToolboxService.cs System.Threading.ThreadPool.QueueUserWorkItem (delegate { List nodes = new List (); try { IEnumerable newItems = provider.GetDefaultItems (); if (newItems != null) nodes.AddRange (newItems); } catch (Exception ex) { LoggingService.LogError ("Error getting default items from a IToolboxDefaultProvider", ex); } LoaderContext ctx = null; try { IEnumerable files = provider.GetDefaultFiles (); if (files != null) { ctx = new LoaderContext (); foreach (string f in files) nodes.AddRange (GetFileItems (ctx, f)); } } finally { if (ctx != null) ctx.Dispose (); } DispatchService.GuiDispatch (delegate { AddUserItems (nodes); initializing--; SaveConfiguration (); OnToolboxContentsChanged (); }); }) Link To Source File
monodevelop GuiBuilderService.cs // Run the generation in another thread to avoid freezing the GUI System.Threading.ThreadPool.QueueUserWorkItem (delegate { try { // Generate the code in another process if stetic is not isolated CodeGeneratorProcess cob = (CodeGeneratorProcess)Runtime.ProcessService.CreateExternalProcessObject (typeof(CodeGeneratorProcess), false); using (cob) { generationResult = cob.GenerateCode (projects, info.GenerateGettext, info.GettextClass, project.UsePartialTypes); } } catch (Exception ex) { generatedException = ex; } finally { generating = false; } }) Link To Source File
monodevelop Application.cs // The backend process needs to be restarted. // This is done in background. ThreadPool.QueueUserWorkItem (delegate { try { // Start the new backend ApplicationBackendController newController = new ApplicationBackendController (this, channelId); newController.StartBackend (); Gtk.Application.Invoke (newController, EventArgs.Empty, OnNewBackendStarted); } catch { // FIXME: show an error message } }) Link To Source File
monodevelop GuiBuilderService.cs // Run the generation in another thread to avoid freezing the GUI System.Threading.ThreadPool.QueueUserWorkItem ( delegate { try { // Generate the code in another process if stetic is not isolated CodeGeneratorProcess cob = (CodeGeneratorProcess) Runtime.ProcessService.CreateExternalProcessObject (typeof (CodeGeneratorProcess), false); using (cob) { generationResult = cob.GenerateCode (projectFolders, info.GenerateGettext, info.GettextClass, project.UsePartialTypes, info); } } catch (Exception ex) { generatedException = ex; } finally { generating = false; } }) Link To Source File
monodevelop Application.cs // The backend process needs to be restarted. // This is done in background. ThreadPool.QueueUserWorkItem (delegate { try { // Start the new backend ApplicationBackendController newController = new ApplicationBackendController (this, channelId); newController.StartBackend (); Gtk.Application.Invoke (newController, EventArgs.Empty, OnNewBackendStarted); } catch { // FIXME: show an error message } }) Link To Source File
monodevelop RefactoringService.cs System.Threading.ThreadPool.QueueUserWorkItem (delegate { try { string disabledNodes = PropertyService.Get ("ContextActions." + doc.Editor.Document.MimeType, "") ?? ""; var availableFixes = new List (contextActions.Where (fix => disabledNodes.IndexOf (fix.Type.FullName) < 0 && fix.Action.IsValid (doc, loc)).Select (fix => fix.Action)); var ext = doc.GetContent (); if (ext != null) { foreach (var result in ext.GetResultsAtOffset (doc.Editor.LocationToOffset (loc.Line, loc.Column))) { var fresult = result as FixableResult; if (fresult == null) continue; foreach (var action in FixOperationsHandler.GetActions (doc, fresult)) { availableFixes.Add (new AnalysisContextAction (result, action)); } } } callback (availableFixes); } catch (Exception ex) { LoggingService.LogError ("Error in analysis service", ex); } }) Link To Source File
monodevelop AnalysisService.cs ThreadPool.QueueUserWorkItem (delegate { try { var results = Analyze (input, treeType); callback (results); } catch (Exception ex) { LoggingService.LogError ("Error in analysis service", ex); } }) Link To Source File
monodevelop WebReferenceDialog.cs // Query the current url for services ThreadPool.QueueUserWorkItem(new WaitCallback(QueryService), this.tbxReferenceURL.Text) Link To Source File
monodevelop WebReferenceDialog.cs ThreadPool.QueueUserWorkItem(new WaitCallback(QueryService), this.tbxReferenceURL.Text) Link To Source File
monodevelop WebReferenceDialog.cs ThreadPool.QueueUserWorkItem(new WaitCallback(QueryService), this.tbxReferenceURL.Text) Link To Source File
monodevelop XmlTextEditorExtension.cs System.Threading.ThreadPool.QueueUserWorkItem (delegate { InferredXmlCompletionProvider newData = new InferredXmlCompletionProvider (); newData.Populate (doc.XDocument); newData.TimeStamp = DateTime.Now; newData.ErrorCount = doc.Errors.Count; this.inferenceQueued = false; this.inferredCompletionData = newData; }) Link To Source File
monodevelop NUnitService.cs // The completed event of the build operation is run in the gui thread, // so we need a new thread, because refreshing must be async System.Threading.ThreadPool.QueueUserWorkItem (delegate { if (op.Success) { RefreshTests (); test = SearchTest (testName); if (test != null) { Gtk.Application.Invoke (delegate { // RunTest must run in the gui thread retOper.TrackOperation (RunTest (test, context, false), true); }); } else retOper.SetCompleted (false); } }) Link To Source File
monodevelop NUnitAssemblyTestSuite.cs System.Threading.ThreadPool.QueueUserWorkItem (delegate { lock (locker) { try { while (Status == TestStatus.Loading) { Monitor.Wait (locker); } if (RefreshRequired) { lastAssemblyTime = GetAssemblyTime (); UpdateTests (); OnCreateTests (); // Force loading while (Status == TestStatus.Loading) { Monitor.Wait (locker); } } oper.SetCompleted (true); } catch { oper.SetCompleted (false); } } }) Link To Source File
monodevelop StatusView.cs ThreadPool.QueueUserWorkItem (delegate { List newList = new List (); newList.AddRange (vc.GetDirectoryVersionInfo(filepath, remoteStatus, true)); DispatchService.GuiDispatch (delegate { if (!disposed) LoadStatus (newList); }); }) Link To Source File
monodevelop StatusView.cs // Run the diff in a separate thread and update the tree when done ThreadPool.QueueUserWorkItem ( delegate { ddata.diffException = null; try { List diffs = new List (); // Calling GenerateDiff and supplying the versioninfo // is the new fast way of doing things. If we do not get // the same number of diffs as VersionInfos, we should // fall back to the old slow method as the VC addin probably // has not implemented the new fast one. // The new way can also only be used locally. if (!remote) { foreach (var vi in statuses) { var diff = vc.GenerateDiff (filepath, vi); if (diff == null) break; diffs.Add (diff); } } if (diffs.Count == statuses.Count) ddata.difs = diffs.ToArray (); else ddata.difs = vc.PathDiff (filepath, null, remote); } catch (Exception ex) { ddata.diffException = ex; } finally { ddata.diffRequested = true; ddata.diffRunning = false; if (null != DiffDataLoaded) { Gtk.Application.Invoke (delegate { DiffDataLoaded (ddata); DiffDataLoaded = null; }); } } } ) Link To Source File
monodevelop BlameWidget.cs ThreadPool.QueueUserWorkItem (delegate { try { annotations = new List (widget.VersionControlItem.Repository.GetAnnotations (widget.Document.FileName)); // for (int i = 0; i < annotations.Count; i++) { // Annotation varname = annotations[i]; // System.Console.WriteLine (i + ":" + varname); // } minDate = annotations.Min (a => a.Date); maxDate = annotations.Max (a => a.Date); } catch (Exception ex) { LoggingService.LogError ("Error retrieving history", ex); } DispatchService.GuiDispatch (delegate { ctx.Dispose (); UpdateWidth (); QueueDraw (); }); }) Link To Source File
monodevelop ChangeSetView.cs // Run the diff in a separate thread and update the tree when done ThreadPool.QueueUserWorkItem ( delegate { ddata.diffException = null; try { ddata.difs = DiffLoader (changeSet.BaseLocalPath); } catch (Exception ex) { ddata.diffException = ex; } finally { ddata.diffRequested = true; ddata.diffRunning = false; if (null != DiffDataLoaded) { Gtk.Application.Invoke (delegate { DiffDataLoaded (ddata); DiffDataLoaded = null; }); } } } ) Link To Source File
monodevelop LogWidget.cs ThreadPool.QueueUserWorkItem (delegate { string text; try { text = info.Repository.GetTextAtRevision (path, rev); } catch (Exception e) { Application.Invoke (delegate { LoggingService.LogError ("Error while getting revision text", e); MessageService.ShowError ("Error while getting revision text.", "The file may not be part of the working copy."); }); return; } Revision prevRev = null; try { prevRev = rev.GetPrevious (); } catch (Exception e) { Application.Invoke (delegate { LoggingService.LogError ("Error while getting previous revision", e); MessageService.ShowException (e, "Error while getting previous revision."); }); return; } string[] lines; var changedDocument = new Mono.TextEditor.Document (text); if (prevRev == null) { lines = new string[changedDocument.LineCount]; for (int i = 0; i < changedDocument.LineCount; i++) { lines[i] = "+ " + changedDocument.GetLineText (i + 1).TrimEnd ('/r','/n'); } } else { string prevRevisionText = ""; try { prevRevisionText = info.Repository.GetTextAtRevision (path, prevRev); } catch (Exception e) { // The file did not exist at this point in time, so just treat it as empty } var originalDocument = new Mono.TextEditor.Document (prevRevisionText); originalDocument.FileName = "Revision " + prevRev.ToString (); changedDocument.FileName = "Revision " + rev.ToString (); lines = Mono.TextEditor.Utils.Diff.GetDiffString (originalDocument, changedDocument).Split ('/n'); } Application.Invoke (delegate { changedpathstore.SetValue (iter, colDiff, lines); }); }) Link To Source File
monodevelop VersionControlDocumentInfo.cs ThreadPool.QueueUserWorkItem (delegate { lock (updateLock) { try { History = Item.Repository.GetHistory (Item.Path, null); VersionInfo = Item.Repository.GetVersionInfo (Item.Path, false); } catch (Exception ex) { LoggingService.LogError ("Error retrieving history", ex); } DispatchService.GuiDispatch (delegate { OnUpdated (EventArgs.Empty); }); isUpdated = true; } }) Link To Source File
monodevelop Commands.cs ThreadPool.QueueUserWorkItem (delegate { try { using (var gm = new GitMonitor (monitor)) stashes.Create (gm, comment); } catch (Exception ex) { MessageService.ShowException (ex); } finally { monitor.Dispose (); statusTracker.NotifyChanges (); } }) Link To Source File
monodevelop Commands.cs ThreadPool.QueueUserWorkItem (delegate { try { NGit.Api.MergeCommandResult result; using (var gm = new GitMonitor (monitor)) result = stashes.Pop (gm); GitService.ReportStashResult (monitor, result); } catch (Exception ex) { MessageService.ShowException (ex); } finally { monitor.Dispose (); statusTracker.NotifyChanges (); } }) Link To Source File
monodevelop GitService.cs ThreadPool.QueueUserWorkItem (delegate { try { NGit.Api.MergeCommandResult result; using (var gm = new GitMonitor (monitor)) result = s.Apply (gm); ReportStashResult (monitor, result); } catch (Exception ex) { string msg = GettextCatalog.GetString ("Stash operation failed."); monitor.ReportError (msg, ex); } finally { monitor.Dispose (); statusTracker.NotifyChanges (); } }) Link To Source File
monodevelop DebuggerSession.cs System.Threading.ThreadPool.QueueUserWorkItem (delegate { lock (slock) { action (); } }) Link To Source File
monodevelop MSBuildProjectService.cs System.Threading.ThreadPool.QueueUserWorkItem (delegate { DateTime tnow = DateTime.Now; while (tnow < nextCleanup) { System.Threading.Thread.Sleep ((int)(nextCleanup - tnow).TotalMilliseconds); CleanProjectBuilders (); tnow = DateTime.Now; } }) Link To Source File
monodevelop LogReportingService.cs ThreadPool.QueueUserWorkItem (delegate { if (!TryUploadReport (filename, data)) { if (!Directory.Exists (CrashLogDirectory)) Directory.CreateDirectory (CrashLogDirectory); File.WriteAllBytes (CrashLogDirectory.Combine (filename), data); } }) Link To Source File
monodevelop Workbench.cs // Console.WriteLine ("SaveFileStatus(0) " + (DateTime.Now - t).TotalMilliseconds + "ms " + files.Count); ThreadPool.QueueUserWorkItem (delegate { // t = DateTime.Now; lock (fileStatusLock) { foreach (FilePath file in files) { try { FileInfo fi = new FileInfo (file); FileData fd = new FileData (file, fi.Exists ? fi.LastWriteTime : DateTime.MinValue); fileStatus.Add (fd); } catch { // Ignore } } } // Console.WriteLine ("SaveFileStatus " + (DateTime.Now - t).TotalMilliseconds + "ms " + fileStatus.Count); }) Link To Source File
monodevelop Workbench.cs ThreadPool.QueueUserWorkItem (delegate { lock (fileStatusLock) { // DateTime t = DateTime.Now; if (fileStatus == null) return; List modified = new List (); foreach (FileData fd in fileStatus) { try { FileInfo fi = new FileInfo (fd.File); if (fi.Exists) { if (fi.LastWriteTime != fd.Time) modified.Add (fd.File); } else if (fd.Time != DateTime.MinValue) { FileService.NotifyFileRemoved (fd.File); } } catch { // Ignore } } if (modified.Count > 0) FileService.NotifyFilesChanged (modified); // Console.WriteLine ("CheckFileStatus " + (DateTime.Now - t).TotalMilliseconds + "ms " + fileStatus.Count); fileStatus = null; } }) Link To Source File
monodevelop NavigateToDialog.cs ThreadPool.QueueUserWorkItem (delegate { CollectTypes (); if (isAbleToSearchMembers) { getMembersTimer.BeginTiming (); try { lock (members) { foreach (IType type in types) { foreach (IMember m in type.Members) { if (m is IType) continue; members.Add (m); } } } } finally { getMembersTimer.EndTiming (); } } }) Link To Source File
monodevelop ImageLoader.cs System.Threading.ThreadPool.QueueUserWorkItem (delegate { try { HttpWebRequest req = (HttpWebRequest) HttpWebRequest.Create (url); WebResponse resp = req.GetResponse (); MemoryStream ms = new MemoryStream (); using (var s = resp.GetResponseStream ()) { byte[] buf = new byte [8092]; int nr; while ((nr = s.Read (buf, 0, buf.Length)) > 0) ms.Write (buf, 0, nr); } MonoDevelop.Ide.DispatchService.GuiSyncDispatch (delegate { Gdk.PixbufLoader l = new Gdk.PixbufLoader (resp.ContentType); l.Write (ms.ToArray ()); image = l.Pixbuf; l.Close (); }); // Replace the async operation to avoid holding references to all // objects that subscribed the Completed event. loadOperation = NullAsyncOperation.Success; } catch (Exception ex) { loadMonitor.ReportError (null, ex); loadOperation = NullAsyncOperation.Failure; } var monitor = loadMonitor; Gtk.Application.Invoke (delegate { monitor.Dispose (); }); loadMonitor = null; }) Link To Source File
monodevelop WelcomePageNewsFeed.cs //HACK: .NET blocks on DNS in BeginGetResponse, so use a threadpool thread // see http://stackoverflow.com/questions/1232139#1232930 System.Threading.ThreadPool.QueueUserWorkItem ((state) => { var request = (HttpWebRequest)WebRequest.Create (newsUrl); try { //check to see if the online news file has been modified since it was last downloaded string localCachedNewsFile = CacheFile; var localNewsXml = new FileInfo (localCachedNewsFile); if (localNewsXml.Exists) request.IfModifiedSince = localNewsXml.LastWriteTime; request.BeginGetResponse (HandleResponse, request); } catch (Exception ex) { LoggingService.LogWarning ("Welcome Page news file could not be downloaded.", ex); lock (updateLock) isUpdating = false; } }) Link To Source File
monodevelop LogReportingStartup.cs System.Threading.ThreadPool.QueueUserWorkItem (delegate { // Process cached crash reports if there are any and uploading is enabled LogReportingService.ProcessCache (); }) Link To Source File
BGMRcon RconClient.cs ThreadPool.QueueUserWorkItem(new WaitCallback(RaiseConnectErrorThread), new object[] { client, ex }) Link To Source File
BGMRcon RconClient.cs ThreadPool.QueueUserWorkItem(new WaitCallback(HandlePacketReceive), new ParsePacketState(client, packets)) Link To Source File
BGMRcon RconClient.cs //when the Connected event is raised, using LogOn (and future methods that use MRESes) blocks //subsequent Receives, and there's no easy way to determine if the MRESs will block the UI thread or //socket thread. therefore, this event will be raised in a ThreadPool thread. ThreadPool.QueueUserWorkItem(new WaitCallback(RaiseConnectedThread), client) Link To Source File
OG-DotNet SecurityWindow.xaml.cs ThreadPool.QueueUserWorkItem(delegate { try { CancelIfCancelled(token); var request = new SecuritySearchRequest(PagingRequest.OfPage(currentPage, 20), name, type); var results = SecurityMaster.Search(request); CancelIfCancelled(token); Dispatcher.Invoke((Action)(() => { CancelIfCancelled(token); itemGrid.DataContext = results.Documents.Select(s => s.Security).ToList(); itemGrid.SelectedIndex = 0; pageCountLabel.DataContext = results.Paging; currentPageLabel.DataContext = results.Paging; outerGrid.UpdateLayout(); })); } catch (OperationCanceledException) { } }) Link To Source File
kudu RpcService.cs ThreadPool.QueueUserWorkItem(_ => { try { IDeploymentManager deploymentManager = _deploymentManagerFactory.CreateDeploymentManager(); deploymentManager.Deploy(); } catch (Exception ex) { // TODO: Add better logging Debug.WriteLine(ex.Message); } }) Link To Source File
ENN Program.CommandHandlers.cs ThreadPool.QueueUserWorkItem(network.StartNetwork) Link To Source File
Floe NatHelper.cs ThreadPool.QueueUserWorkItem((o) => { int tries = MaxTries; while (--tries >= 0) { try { sock.SendTo(outBuf, endpoint); sock.ReceiveTimeout = DiscoverTimeout; while (true) { int length = sock.Receive(inBuf); string data = Encoding.ASCII.GetString(inBuf, 0, length).ToLowerInvariant(); var match = ResponseLocation.Match(data); if (match.Success && match.Groups["location"].Success) { System.Diagnostics.Debug.WriteLine("Found UPnP device at " + match.Groups["location"]); string controlUrl = GetServiceUrl(match.Groups["location"].Value); if (!string.IsNullOrEmpty(controlUrl)) { _controlUrl = controlUrl; System.Diagnostics.Debug.WriteLine("Found control URL at " + _controlUrl); ar.IsSuccessful = true; break; } else { continue; } } } } catch (Exception ex) { // ignore timeout exceptions if (!(ex is SocketException && ((SocketException)ex).ErrorCode == 10060)) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } } ((ManualResetEvent)ar.AsyncWaitHandle).Set(); if (callback != null) { callback(ar); } }, null) Link To Source File
Floe NatHelper.cs ThreadPool.QueueUserWorkItem((o) => { try { SoapRequest(_controlUrl, elem, "AddPortMapping"); ar.IsSuccessful = true; System.Diagnostics.Debug.WriteLine("Started forwarding port " + port); } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } ((ManualResetEvent)ar.AsyncWaitHandle).Set(); if (callback != null) { callback(ar); } }, null) Link To Source File
Floe NatHelper.cs ThreadPool.QueueUserWorkItem((o) => { try { SoapRequest(_controlUrl, elem, "DeletePortMapping"); ar.IsSuccessful = true; System.Diagnostics.Debug.WriteLine("Stopped forwarding port " + port); } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } ((ManualResetEvent)ar.AsyncWaitHandle).Set(); if (callback != null) { callback(ar); } }, null) Link To Source File
ravendb ParallelDeflateOutputStream.cs ThreadPool.QueueUserWorkItem( _DeflateOne, workitem ) Link To Source File
ravendb ParallelDeflateOutputStream.cs ThreadPool.QueueUserWorkItem( _DeflateOne, workitem ) Link To Source File
RS-TV-Show-Tracker DetectOpenFiles.cs ThreadPool.QueueUserWorkItem(new WaitCallback(GetFileNameFromHandle), f) Link To Source File
DynamicScript DefaultQueue.cs ThreadPool.QueueUserWorkItem(ProcessQueue, m_queue) Link To Source File
DynamicScript ParallelQueue.cs ThreadPool.QueueUserWorkItem(item.Enqueue, new WorkItemStartParameters(target, workItem, state)) Link To Source File
open-syno ReadWriteMemoryStream.cs ThreadPool.QueueUserWorkItem(o => { while (read == 0 && this.Position < this.Length && (_lastFailedRead == DateTime.MaxValue || _lastFailedRead.AddMilliseconds(ReadTimeout) < DateTime.Now)) { read = base.Read(buffer, offset, count); if (read == 0 && _lastFailedRead == DateTime.MaxValue) { _lastFailedRead = DateTime.Now; } } if (read == 0) { _logService.Trace("Connection lost, data could not be read."); } callback(ar); }) Link To Source File
HAW-Stundenplan Parallel.cs ThreadPool.QueueUserWorkItem(ParallelWork, i) Link To Source File
codegallery Program.cs ThreadPool.QueueUserWorkItem(new WaitCallback(listener.StartListening), responseQueueUrl) Link To Source File
codegallery Program.cs ThreadPool.QueueUserWorkItem(new WaitCallback(listener.StartListening), handler) Link To Source File
projects HeartbeatTest.cs ThreadPool.QueueUserWorkItem(new WaitCallback(Increment), null) Link To Source File
Codify WebServices.cs ThreadPool.QueueUserWorkItem(sender => { Thread.Sleep(2000); if (e.Cancelled) Deployment.Current.Dispatcher.BeginInvoke(() => callback(null)); else if (e.Error == null) Deployment.Current.Dispatcher.BeginInvoke(() => callback(e.Result)); else throw e.Error; }) Link To Source File
csharputils CertificateChain.cs ThreadPool.QueueUserWorkItem(new WaitCallback(this.StartVerification), ret) Link To Source File
csharputils FastcgiHandler.cs ThreadPool.QueueUserWorkItem(HandleRequest, Request) Link To Source File
csharputils FastcgiServer.cs ThreadPool.QueueUserWorkItem(HandleAcceptedSocket, AcceptedSocket) Link To Source File
csharputils HttpServer.cs ThreadPool.QueueUserWorkItem(HandleAcceptedSocket, TcpListener.AcceptSocket()) Link To Source File
WS-Man.Net CallbackThreadPoolPullSubscriptionClient.cs ThreadPool.QueueUserWorkItem(WaitCallback, null) Link To Source File
twdc AsyncHelper.cs ThreadPool.QueueUserWorkItem(dynamicInvokeShim, new TargetInfo(d, args)) Link To Source File
twdc AsyncManagerExtensionsTest.cs ThreadPool.QueueUserWorkItem(_ => { Assert.AreEqual(1, asyncManager.OutstandingOperations.Count, "Counter shouldn't have been decremented yet."); callback(asyncResult); waitHandle.Set(); }) Link To Source File
twdc AsyncHelper.cs ThreadPool.QueueUserWorkItem(dynamicInvokeShim, new TargetInfo(d, args)) Link To Source File
WebTyphoon WebSocketConnection.cs ThreadPool.QueueUserWorkItem(NotifyWebSocketFragmentRecieved, e) Link To Source File
torshify-server PlayerCallbackHandler.cs ThreadPool.QueueUserWorkItem( state => Execute( callback => callback.OnVolumeChanged((float)state)), volume) Link To Source File
vcap-dotnet Agent.cs ThreadPool.QueueUserWorkItem( delegate { DetectAppReady( instance, delegate(bool detected) { try { instance.Lock.EnterWriteLock(); if (detected) { if (instance.Properties.State == DropletInstanceState.Starting) { Logger.Info(Strings.InstanceIsReadyForConnections, instance.Properties.LoggingId); instance.Properties.State = DropletInstanceState.Running; instance.Properties.StateTimestamp = DateTime.Now; this.deaReactor.SendDeaHeartbeat(instance.GenerateHeartbeat().SerializeToJson()); this.RegisterInstanceWithRouter(instance); this.droplets.ScheduleSnapshotAppState(); } } else { Logger.Warning(Strings.GivingUpOnConnectingApp); this.StopDroplet(instance); } } finally { instance.Lock.ExitWriteLock(); } }); }) Link To Source File
vcap-dotnet NodeBase.cs // This may take a long time (it can unbind many services), so we run it on a different thread; ThreadPool.QueueUserWorkItem( (data) => { Logger.Debug(Strings.OnPurgeOrphanDebugLogMessage, ServiceDescription()); SimpleResponse response = new SimpleResponse(); try { PurgeOrphanRequest request = new PurgeOrphanRequest(); request.FromJsonIntermediateObject(JsonConvertibleObject.DeserializeFromJson(msg)); bool result = this.PurgeOrphan(request.OrphanInsList, request.OrphanBindingList); if (result) { NodeNats.Publish(reply, null, EncodeSuccess(response)); } else { NodeNats.Publish(reply, null, EncodeFailure(response)); } } catch (Exception ex) { Logger.Warning(ex.ToString()); NodeNats.Publish(reply, null, EncodeFailure(response, ex)); } }) Link To Source File
ORTS_mk2 Space.cs ThreadPool.QueueUserWorkItem(new WaitCallback(delegate(object state) { using (OpenTKWindow p = new OpenTKWindow(engine)) { // p.AddView(typeof(TestUnit), new TestUnitView()); p.Run(); } }), null) Link To Source File
WCell QueueTest.cs ThreadPool.QueueUserWorkItem((indexObj) => { var index = (int)indexObj; var x = q.TryDequeue(); lock (values) { if (index == num - 1) { done = true; Monitor.PulseAll(values); } } }, i) Link To Source File
WCell CharacterPool.cs ThreadPool.QueueUserWorkItem((iObj) => { var i = (uint)iObj; var chr = Create(); chr.SetName("Char" + charNum++); // abuse entryid as identifier chr.SetUInt32(ObjectFields.ENTRY, i + 1); chars[i] = chr; map.AddMessage(new Message(() => { var pos = Setup.DefaultPosition; map.AddObjectNow(chr, ref pos); added++; if (added == num) { lock (chars) { Monitor.Pulse(chars); } } })); }, index) Link To Source File
WCell Channel.cs ThreadPool.QueueUserWorkItem(PoolCallback, Actor) Link To Source File