[Mono-dev] completionPortThreads in threadpool.c not used?

Robert Jordan robertj at gmx.net
Sun Apr 1 08:37:46 EDT 2007


John Hurliman wrote:
> I'm writing a UDP client that attempts to detect when there are no more 
> available threads in the ThreadPool for doing packet processing with 
> Begin/EndReceiveFrom(), and I noticed in 
> http://svn.myrealbox.com/viewcvs/trunk/mono/mono/metadata/threadpool.c?rev=73042&view=markup 
> that the completionPortThread argument is always set to zero or not used 
> in all of the static ThreadPool members. Does Mono handle things 
> differently, and how can I find out if there are available threads to 
> process additional packets? I was going to ask about the status of 
> ThreadPool.SetMaxThreads but it may not be relevant if Mono is not using 
> the completionPortThread argument.
> 
> John Hurliman
> libsecondlife Developer (http://www.libsecondlife.org/)

The required infos are already available but they were not exposed
by ThreadPool.GetMin|MaxThreads and SetMaxThreads was not implemented.

The attached patches should fix that (up to the MonoTODO issues).

Robert
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ThreadPool.cs.diff
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070401/a16ef941/attachment.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: threadpool.c.diff
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070401/a16ef941/attachment-0001.pl 


More information about the Mono-devel-list mailing list