thread最新書籤
Marlon.ERP | 用 .Net 開發多執行緒程式 - 相關類別介紹 
Marlon.ERP | 用 .Net 開發多執行緒程式 - 相關類別介紹 
anson 收藏於 2009/04/05
分類:其他
介紹好用元件:Smart Thread Pool 
介紹好用元件:Smart Thread Pool 
介紹好用元件:Smart Thread Pool
採用 .Net Framework 內建的 ThreadPool 雖然也不錯用,但若真的實際用來開發時,就會發現有許多使用情境會導致程式碼過於複雜、不容易閱讀。最近發現 Smart Thread Pool 似乎蠻不錯用的,如果你的程式... 繼續閱讀...
採用 .Net Framework 內建的 ThreadPool 雖然也不錯用,但若真的實際用來開發時,就會發現有許多使用情境會導致程式碼過於複雜、不容易閱讀。最近發現 Smart Thread Pool 似乎蠻不錯用的,如果你的程式...繼續閱讀
分類:其他
以 C# 撰寫多執行緒 (Multi-threading) 相關學習資源整理 
以 C# 撰寫多執行緒 (Multi-threading) 相關學習資源整理 
為了讓應用程式執行的更有效率,我們通常會採用 非同步程式設計模式 ( Asynchronous Programming Design Patterns ) 或 多執行緒處理 ( Managed Threading ) 的方式進行開發,... 繼續閱讀...
為了讓應用程式執行的更有效率,我們通常會採用 非同步程式設計模式 ( Asynchronous Programming Design Patterns ) 或 多執行緒處理 ( Managed Threading ) 的方式進行開發,...繼續閱讀
分類:軟體
MSDN Magazine 閱讀心得: Stream Pipeline 
MSDN Magazine 閱讀心得: Stream Pipeline 
前一陣子研究了幾種可以在 .NET 善用多核心的作法之後, 最近剛好又在在 MSDN Magazine 看到這篇不錯的文章: http://msdn.microsoft.com/msdnmag/issues/08/02/NETMatters/default.aspx 裡面點出了另一種作法: 串流管線 (Stream Pipeline)...
分類:軟體
[C# yield return] #2. 另類的應用 - Thread Sync 替代方案 
[C# yield return] #2. 另類的應用 - Thread Sync 替代方案 
繼上篇,講了一些 yield return 編譯後產生的 Code, 說明了 C# compiler 如何用簡單的語法替你實作了 IEnumerator 介面,而完全不會增加程式的複雜度,這是我認為 C# 提供最讚的 Syntax Sugar ...。 不過無意間我想到了 yield return 還有另一種應用方式。靈感來自之前 Darkthread 舉辦的 [黑暗盃程式魔人賽]。因為參賽題目 [xAxB猜數字遊戲] 原本就是考驗演算法,邏輯就不大簡單了,加上要配合 GameHost 的呼叫方式,難度更提高不少。因此之前貼了兩篇文章 [ThreadSync #1. 概念篇
分類:軟體
Using the BackgroundWorker component 
Using the BackgroundWorker component 
anson 收藏於 2008/03/26
分類:其他
Simple UDP Server - Linux Kernel Newbies 
Simple UDP Server - Linux Kernel Newbies 
badpsyche 收藏於 2008/02/19
Howto create a UDP Server in kernel-space
分類:軟體
Linux pthread_create 
Linux pthread_create 
Vincent 收藏於 2007/11/03
pthread_create( &a_thread, a_thread_attribute, (void *)&thread_function, (void *) &some_argument);
分類:軟體
tmarq's blog on ASP.NET, IIS, and performance : ASP.NET Thread Usage on IIS 7.0 and 6.0 
tmarq's blog on ASP.NET, IIS, and performance : ASP.NET Thread Usage on IIS 7.0 and 6.0 
elleryq 收藏於 2007/07/23
I'd like to briefly explain how ASP.NET uses threads when hosted on IIS 7.0 and IIS 6.0, as well as the configuration changes that you can make to alter the defaults. Please take a quick look at the “Threading Explained” section in Chapter 6 of “Improving .NET Application Performance and Scalability”. Prior to v2.0 of the .NET Framework, it was necessary to tweak the processModel/maxWorkerThreads, processModel/maxIoThreads, httpRuntime/minFreeThreads, httpRuntime/minLocalRequestFreeThreads, and connectionManagement/maxconnection configuration. The v2.0 .NET Framework attempted to simplify this by adding a new processModel/autoConfig configuration, which made the changes for you at runtime. And with the introduction of IIS 7.0 and the ASP.NET integrated pipeline, we've introduced yet another element to the mix, a registry key named MaxConcurrentRequestsPerCpu. Lets start with a discussion of how things worked on IIS 6.0 before discussing the changes made in IIS 7.0.
分類:軟體
COdE fr3@K » Blog Archive » Avoid Pointer Parameters and Inheritance 
COdE fr3@K » Blog Archive » Avoid Pointer Parameters and Inheritance 
elleryq 收藏於 2007/07/06
Microsoft 的 MFC 是最早被大量採用 (massive adoption) 的 C++ library 之一. 等到我開始接觸 C++ Standard Library 這東西都已經是玩了兩年 MFC 以後的事. 還記得, 從一開始對 MFC 的讚嘆與擁抱, 幾年後對它的不屑, 到更後來的理解 (理解不好其實也是有原因的).
即便不少 programmer 知道 MFC 是一套瑕疵遍佈的 library, 可能也知道那些地方有問題. 但它以及部份其他 library 聯手對於更多 C++ programmer 造成的傷害已經留下不容易抹滅的痕跡. 它讓許多 programmer 以為這些東西本來就該這樣 (that’s the way things supposed to be), 當有一天這些被誤導的 programmer 有機會可以選擇另一套 library 或是自行設計的時候, 很容易就陷入 MFC 帶給他們已先入為主的錯誤觀念.
分類:其他
Real Checko's Blog: UpdateData in Thread 
Real Checko's Blog: UpdateData in Thread 
elleryq 收藏於 2007/06/28
在Thread 中call UpdateData( )會導致Crash。
據說,Win32 programming 有一條Rule(http://forums.ni.com/ni/board/message?board.id=231&message.id=4331):
"Thou shall not access UI controls from a thread other than the one that created the UI control in the first place"
因為Dialog 不是Thread Safe。
所以,可以用UpdateData( )這個funciton 的,也只有Dialog 自己這個thread 囉。
分類:其他
SynchronizationContext 
SynchronizationContext 
elleryq 收藏於 2007/05/11
在编写桌面程序需要使用多线程时,如果在工作线程里需要更新界面上的东西,因为Windows编程的特性,需要将这个工作放在界面所在的线程来执行。在1.*里,需要使用控件的BeginInvoke和判断控件的InvokeRequired属性来实现。可以参考Chris Sells在MSDN上的文章,
Safe, Simple Multithreading in Windows Forms, Part 2
http://msdn2.microsoft.com/en-us/library/ms951109.aspx
.NET 2.0 引进了System.Threading.SynchronizationContext类,
http://msdn2.microsoft.com/en-us/library/system.threading.synchronizationcontext.aspx
这个类 “Provides the basic functionality for propagating a synchronization context in various synchronization models.”
用这个类可以简化要写的编码。




標籤:



標籤:


標籤:

















訂閱