Re: [Mono-dev] GC.Collect() CLRMono difference.

2009-01-08 Thread Sunny
On Thu, Jan 8, 2009 at 10:33 AM, Lucas Meijer lu...@lucasmeijer.com wrote:
 Here's another one.  (Unsure if these are considered ontopic. If not,
 please let me know)

 This small test program shows GC.Collect() + WeakReference working
 different on CLR
 than they do on Mono. In mono, the WeakReference is still alive after
 GC.Collect(),
 in the clr, the WeakReference is no longer active.

 using System;

 public class MonoTest2
 {
public static void Main()
{
var obj = new Version();
WeakReference reference = new WeakReference(obj);
obj = null;
GC.Collect();
Console.WriteLine(reference.IsAlive:  + reference.IsAlive);
//mono outputs true
//clr outputs false
}
 }


 If people think this is a a bug, I'll file a report.

 Bye, Lucas

According to this:
http://msdn.microsoft.com/en-us/library/system.weakreference(VS.80).aspx

IsAlive becomes false after the finalizer is done. It may be so, that
under mono your call to IsAlive is made before the finalizer is
called. Try with GC.WaitForPendingFinalizers() before the check.

-- 
Svetoslav Milenov (Sunny)

Even the most advanced equipment in the hands of the ignorant is just
a pile of scrap.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] GC.Collect() CLRMono difference.

2009-01-08 Thread Sunny
On Thu, Jan 8, 2009 at 11:45 AM, Sunny slon...@gmail.com wrote:

 According to this:
 http://msdn.microsoft.com/en-us/library/system.weakreference(VS.80).aspx

 IsAlive becomes false after the finalizer is done. It may be so, that
 under mono your call to IsAlive is made before the finalizer is
 called. Try with GC.WaitForPendingFinalizers() before the check.


Hmmm, I just tried it under mono, it still outputs True. Looks like a bug.


-- 
Svetoslav Milenov (Sunny)

Even the most advanced equipment in the hands of the ignorant is just
a pile of scrap.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Bug in System.Net.ServicePointManager. The runtime does not honor DefaultConnectionLimit.

2007-11-05 Thread Sunny
The mono runtime does not honor DefaultConnectionLimit, nor the
machine.config file setting maxconnections. It always open only 2
simultaneous connections to a host.

Detailed explanations with test code are posted in the bug report:
https://bugzilla.novell.com/show_bug.cgi?id=339422

Cheers

-- 
Svetoslav Milenov (Sunny)

Even the most advanced equipment in the hands of the ignorant is just
a pile of scrap.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] web handlers and codebehind

2007-10-31 Thread Sunny
On 10/29/07, Sunny [EMAIL PROTECTED] wrote:
 Hi,
 I filed a bug report with monodevelop, as that's how I found the
 problem. But can somebody take a look and see if this actually is a
 problem with xsp itself?

 here is the case:
 https://bugzilla.novell.com/show_bug.cgi?id=337674


I have filed a mono bug as well:
https://bugzilla.novell.com/show_bug.cgi?id=337997

Cheers

-- 
Svetoslav Milenov (Sunny)

Even the most advanced equipment in the hands of the ignorant is just
a pile of scrap.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] web handlers and codebehind

2007-10-30 Thread Sunny
On 10/30/07, Onur Gumus [EMAIL PROTECTED] wrote:
 I can browse web handlers in 2.0 runtime without a problem


Do you say that it works with xsp2? If so, this is clearly a bug with
xsp. Please confirm, and I'll file the it.

Thanks

-- 
Svetoslav Milenov (Sunny)

Even the most advanced equipment in the hands of the ignorant is just
a pile of scrap.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] web handlers and codebehind

2007-10-30 Thread Sunny
On 10/30/07, Onur Gumus [EMAIL PROTECTED] wrote:
 I haven't tried with the recent versions. But with 1.2.4 I was able to
 create a web handler that spits out some xml output as an rss feeder.
 And it was working with xsp2.


Did you use codebehind class, or you put the code in the ashx file
itself? If later, it works as adverised. My problem is with a
codebehind class.

-- 
Svetoslav Milenov (Sunny)

Even the most advanced equipment in the hands of the ignorant is just
a pile of scrap.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] debugging xsp runtime compilr errors

2007-10-30 Thread Sunny
Hi,
I'm trying to run and .ashx IHttpAsyncHandler with xsp and xsp2. The
c# code for the handler is in the .ashx file itself. When I hit the
server, it generates Internal Server error 500. I have set logging in
the Global.asax.cs file to capture unhandled exceptions, and the
output is:

System.Web.Compilation.CompilationException: Exception of type
System.Web.Compilation.CompilationException was thrown.
  at System.Web.Compilation.WebServiceCompiler.CheckCompilerErrors
(System.CodeDom.Compiler.CompilerResults results) [0x0]
  at System.Web.Compilation.WebServiceCompiler.GetCompiledType () [0x0]
  at System.Web.Compilation.WebServiceCompiler.CompileIntoType
(System.Web.UI.SimpleWebHandlerParser wService) [0x0]
  at System.Web.UI.WebHandlerParser.GetCompiledType
(System.Web.HttpContext context, System.String virtualPath,
System.String physicalPath) [0x0]
  at System.Web.UI.SimpleHandlerFactory.GetHandler
(System.Web.HttpContext context, System.String requestType,
System.String virtualPath, System.String path) [0x0]
  at System.Web.HttpApplication.GetHandler (System.Web.HttpContext
context) [0x0]
  at System.Web.HttpApplication+c__CompilerGenerated2.MoveNext () [0x0]

This output is not enough for me to diagnose what the problem is. I
have put the whole c# code in a separate file, and it compiles w/o any
error, so I can not guess why the pre-compile in xsp fails.

How can I enable more detailed output about what's going on?

Btw, the same code in .Net works just fine. As well as much simpler
code, w/o referencing external .dlls.

In my code, I do use classes from other dll, so maybe the reference is
not takein into account. The whole project is done in monodevelop
0.16.

Any poiners will be higly appreciated.

Thanks

-- 
Svetoslav Milenov (Sunny)

Even the most advanced equipment in the hands of the ignorant is just
a pile of scrap.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] web handlers and codebehind

2007-10-29 Thread Sunny
Hi,
I filed a bug report with monodevelop, as that's how I found the
problem. But can somebody take a look and see if this actually is a
problem with xsp itself?

here is the case:
https://bugzilla.novell.com/show_bug.cgi?id=337674

Cheers

-- 
Svetoslav Milenov (Sunny)

Even the most advanced equipment in the hands of the ignorant is just
a pile of scrap.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] .Net 2.0 asynchronous web pages

2007-09-11 Thread Sunny
On 9/11/07, Konstantin Triger [EMAIL PROTECTED] wrote:
 The feature actually consists of 2 sub-features:
 1. Runtime support (Page API).
 2. Aspx parser support.

 Several months ago we completed (1). So currently someone needs to ensure (2) 
 works too.
 While implementing it, we did not find any really useful scenario why someone 
 may need this feature. Can you please explain what your use case is?

Hi Kosta,
the scenario is the same as with async web services - to free a
threadpool thread not to be used for a long term operations.

I have a web page (I can use web service, but it returns a blob of 1M
binary data, so with soap, etc, it will be at least doubled) which
returns a blob of binary data, which is collected after a lot of web
service and database requests in different threads (async, so io
threads from the thread pool). When you have too many incoming
requests, which block for a long time thread pool threads, and in the
same time your execution occupies thread pool threads for the outgoing
requests, the result may be a dead lock, and dropped requests, because
no one knows the order of thread assignment (i.e. the order in which
you will receive incoming requests, and when your own requests will
start). As elementary example (thread pool with only 4 threads):
- receive first request and block untill finish - 3 in the pool
- receive sec. request and block - 2 in the pool
- first req. starts 3 own threads to get data - they in term need 3
thread pool threas - 2 are available, and one queued
- third request is received, and queued (not pool threads)
- forth request is received, and queued (not pool threads)
- fifth request is received, and queued (not pool threads)
- second req. starts 3 threads as well, and the framework queues them
- one of the requests from the first request is finished and thread
pool thread is freed
- it is assigned to the third call made by the first request
- next req. finishes, and the thread is assigned to the third incoming
request, and block, because its processing stops to wait thread pool
threads (3 of them).
- now, when the 3th thread from the first incoming is finished, it
will go to the forth incoming request and blocked

now you have your thread pool blocked on requests, which in terms wait
on the tread pool. Eventually this will end with some time-outed
requests, but may end with really bad dead lock.

That's why using async web services is good for such a scenario, and
because I need web page instead web service, I need the async
approach.

Of course, there are online some examples how to do this with 1.1 and
creating your own aspx handler, so you make the call async.

And, of course, maybe I can rethink the design. But lets say that this
is the approach which serves me best.

Basically, I have the application, implemented for 2.0, and now I just
have to decide what server to use - win or linux. And I would prefer
linux. So, maybe I'll go with some of the workarounds, i.e. to
implement my own handler, or I may wait some time, if this is planned
feature.

For reference:
http://msdn.microsoft.com/msdnmag/issues/05/10/WickedCode/

And this is a comparison in the performance when using async vs sync
pages, when the page logic makes a lot of async requests itself:
http://www.pluralsight.com/blogs/fritz/archive/2004/10/19/2892.aspx

Pls, note, that I could not find the original article I read about the
dead blocking scenario, so I just tried to reproduce it (maybe
inaccurate).

Cheers

-- 
Svetoslav Milenov (Sunny)

Even the most advanced equipment in the hands of the ignorant is just
a pile of scrap.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] .Net 2.0 asynchronous web pages

2007-09-10 Thread Sunny
On 8/5/07, Adar Wesley [EMAIL PROTECTED] wrote:

 As far as I know the Async pages feature is not fully implemented.


Is there any timeline for this? Does someone work on it?

-- 
Svetoslav Milenov (Sunny)

Even the most advanced equipment in the hands of the ignorant is just
a pile of scrap.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] .Net 2.0 asynchronous web pages

2007-09-10 Thread Sunny
I just opened a bug:
http://bugzilla.ximian.com/show_bug.cgi?id=82783

-- 
Svetoslav Milenov (Sunny)

Even the most advanced equipment in the hands of the ignorant is just
a pile of scrap.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] web application domains in apache

2006-10-13 Thread Sunny
Hi,
How is mod_mono implemented, is it possible different web applications
to run in their own process space (or app domain pool) under apache. I
mean, different virtual directories, as it is under IIS 6.0?

I need to be able to deploy a couple of web services on one server,
and each one of them to use their own thread pool, etc.

-- 
--
Svetoslav Milenov (Sunny)

Even the most advanced equipment in the hands of the ignorant is just
a pile of scrap.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] web application domains in apache

2006-10-13 Thread Sunny
On 10/13/06, Miguel de Icaza [EMAIL PROTECTED] wrote:
 Hello,

  How is mod_mono implemented, is it possible different web applications
  to run in their own process space (or app domain pool) under apache. I
  mean, different virtual directories, as it is under IIS 6.0?
 
  I need to be able to deploy a couple of web services on one server,
  and each one of them to use their own thread pool, etc.

 See:

 http://www.mono-project.com/Mod_mono#Multiple_Applications.2C_Multiple_mod-mono-servers

 Miguel.


Great. Thanks

-- 
--
Svetoslav Milenov (Sunny)

Even the most advanced equipment in the hands of the ignorant is just
a pile of scrap.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Red Carpet repository

2006-09-18 Thread Sunny
Hi,
I'm trying to use the smart package manager to install/update mono.
I'm using:
SuSE 10.0 x86_64
smart ver. 0.42

In the past (a few months ago) I had setup smart to use this URL:
http://go-mono.com/download/mono/suse-100-x86_64

But now there is no such an URL. smart reports:
http://go-mono.com/download/mono/suse-100-x86_64/packageinfo.xml.gz: Not Found

The directory /download on the server is not browsable, so I can not
figure it out by myself.

What is the right URL for the packageinfo.xml.gz file for SuSE 10.0 x86_64?

Thanks

-- 
--
Svetoslav Milenov (Sunny)
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] After two tried I get a System.Net.WebException: The request timed out

2006-05-02 Thread Sunny

On 5/2/06, Carlos Solorzano [EMAIL PROTECTED] wrote:

Can someone else confirm this with me, I have an infinite loop calling a
webpage (google is there just for you guys but I was calling a server
internal to my network). On windows it runs fine but on mono I get a
timeout after the second try. I have 1.1.10.1

using System;

namespace ConsoleApplication4
{
/// summary
/// Summary description for Class1.
/// /summary
class Class1
{
/// summary
/// The main entry point for the application.
/// /summary
[STAThread]
static void Main(string[] args)
{
int i = 0;
while(true)
{

try
{

System.Net.WebRequest.Create(http://google.com;).GetResponse().GetResponseStream().ReadByte();
Console.WriteLine(new conn  + (i++)  );
}
catch(Exception ex)
{
Console.WriteLine(ERROR:  + ex);
}
System.Threading.Thread.Sleep(1000);
}
}
}
}

#mono ConsoleApplication4.exe
new conn 0
new conn 1
ERROR: System.Net.WebException: The request timed out
in 0x00147 System.Net.HttpWebRequest:EndGetResponse (IAsyncResult
asyncResult)
in 0x00047 System.Net.HttpWebRequest:GetResponse ()
in 0x00033 ConsoleApplication4.Class1:Main (System.String[] args)



You can/will have problems with this approach under Windows as well.
You do not close the stream, thus not closing the connection. By
default you have only 2 web connections per host, and the next
connections are queued. There may be a bug/problem with the mono
implementation, which does not autoclose the connections in the
timeout period though.

--
--
Svetoslav Milenov (Sunny)

Windows is a 32-bit extension to a 16-bit graphical shell for an 8-bit
operating system originally coded for a 4-bit microprocessor by a
2-bit company that can't stand 1 bit of competition.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] XML Parser

2006-04-10 Thread Sunny
On 4/10/06, Przemysław Sitek [EMAIL PROTECTED] wrote:
 Hi,

I would like to have a XML Parser that parses network XML stream from
 server. I would like to be able to feed it with data received from a socket,
 then be notified of XML nodes encountered in that stream. Say, server sends
 me
 stream
 message/
 presence/
 iq/
 /stream
 I would like to be notified when message/, presence/, iq/ tags, as well
 with XML nodes associated with them.

Can this be achieved (such push-pull behaviour) with System.Xml? What
 class(es) should I use?

 Thanks in advance,
 Przemysław Sitek
 ___


Take a look at XmlTextReader class.

--
--
Svetoslav Milenov (Sunny)
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] good IDE tool to work with MONO source codes in Linux?

2005-12-13 Thread Sunny
On 12/13/05, Anna Ellis [EMAIL PROTECTED] wrote:





 I tried Eclipse….its a really good IDE to use if you are used to developing
 in Visual Studio.  (I'm using c++).  But I haven't worked out yet how to
 plug Mono to it unfortunately.  If anyone knows, please let me know J



 Anna


Here is C# plugin:
http://www.improve-technologies.com/alpha/esharp/

It can compile, but does not use the debugger as far as I know.

Cheers

--
--
Svetoslav Milenov (Sunny)
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] red carpet channel info

2005-12-10 Thread Sunny
Hi,
it start to be hard to keep updating my system using 2 or 3 different
package managers, so I decided to use SMART to keep it up to date, as
it can use red carpet repositories as well, so I can keep mono
updated.

My system is SuSE 9.3, i386. For now I use red carpet to update mono,
but sometimes there are conflicts, or missing base packages, so I need
to use YaST first to install them, then to retry red carpet, etc.

With Smart it should be much more easy, i f I can find info about the
mono channels. This are the fields I can not fill in smart, in order
to make it use mono's redcarpet repositories:

1. Base URL for packages
2. URL for packageinfo XML

I googled a lot, but I can not find useful info about the internal
structure of a red carpet repo, so I can not figure it out by myself
what the right URLs are, based only on the information provided hot to
setup redcarpet for mono. I.e. I only know the services url
http://go-mono/download, and the name of the channels, but it is not
enough.

Any help will be highly appreciated.

Cheers
--
--
Svetoslav Milenov (Sunny)
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] mono X11 rendering

2005-10-14 Thread Sunny
On 10/14/05, Harry [EMAIL PROTECTED] wrote:
 Hi guys,

 I am not sure where to post this questions. Hopefuly
 you guys are able to answer my questions:

 I am developing a simple applications using Thread
 class to change the color of the square (Lab
 assignment)

 everything working correctly, accept I have to drag
 the windows in linux to let the Thread working to
 change the color of a square.


 here is my code:
 using System;
 using System.Windows.Forms;
 using System.Threading;
 using System.Drawing;

 public void Run()
 {
 Random r = new Random();
 while(true)
 {
 c = Color.FromArgb(r.Next(256), r.Next(256),
 r.Next(256));
 Thread.Sleep(200);
 }
 }

 }


I do not know in mono, but in .Net this is not the right way to do it.
All properties and methods of Form class _ARE NOT_ thread safe. You
can not touch them from a different thread (i.e. you can :) but it
will have unexpected behaviour).

The only methods which can be used from a different thread are
BeginInvoke, EndInvoke, Invoke and the property IsInvokeRequired.

You have to create a method which changes the the Color property, and
call this method through a delegate with Invoke. This will dispatch
the calling in the main GUI thread.

Take a look here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnforms/html/winforms06112002.asp

Cheers

--
Svetoslav Milenov (Sunny)
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] .NET Remoting: Upload of a file from a Win32 MS .NET client to a Linux Mono .NET server.

2005-09-05 Thread Sunny
On 9/5/05, Yngve Zackrisson [EMAIL PROTECTED] wrote:
 On Fri, 2005-09-02 at 23:15, Sunny wrote:
  Sorry, replied off the list, here is a copy:
 
 
 
 Not sure you got it right.
 I want to upload data (transfer a file from the client to the server).

It does not matter. If you have a remoting call, and you pass a Stream
over, the Stream.Read method will pass the buffer in both directions,
so you will double the traffic.
In your case, I would make my server method to look like:

public void UploadFileChunk(byte[] buffer)
{
   //add this byte array to FileOut ...
}

And from the client  just loop through your fileIn, sending chunks
to the  server and update your progress bar in the loop.

 
 
  This is a good article on the topic:
  http://www.genuinechannels.com/Content.aspx?id=23type=1
 
 
 I had a refferens to that in my post :-).

Sorry, I did not read it. And still can not find it. Anyway ...

 I gona test the approach suggested by Robert Jordan.
 It is similar to your approach.
 
 Tanks
 
 Yngve Zackrisson.
 

--
Svetoslav Milenov (Sunny)
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] .NET Remoting: Upload of a file from a Win32 MS .NET client to a Linux Mono .NET server.

2005-09-02 Thread Sunny
Sorry, replied off the list, here is a copy:


On 9/2/05, Yngve Zackrisson [EMAIL PROTECTED] wrote:
 Hi there.


 The problems (now) arise when i try to upload a zip file from
 the client to the server.
 I use a parameter with a (File)Stream object to do callbacks

I did not check all your code, but generally this is a bad idea to
pass a Stream object as remoting parameter. That way, when you invoke
a remote call lets say to Read method, you are passing the buffer
array as well in both directions, thus doubling the traffic.

A better approach is to have a remote method like byte[] ReadChunk(int
start, int end) or something like that. Now, you can control from the
client how big chunks you want to receive, and the buffer is only
passed from server to client. Knowing the original size of the file
and the chunks/bytes you already read, you can easily maintain and
update a progress indicator.

This is a good article on the topic:
http://www.genuinechannels.com/Content.aspx?id=23type=1

Cheers
Sunny

--
Svetoslav Milenov (Sunny)
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-devel-list] Windows Forms 2 - WebBrowser control

2005-07-07 Thread Sunny
On 7/7/05, Andrew Sklyarevsky [EMAIL PROTECTED] wrote:
 Hello!
 
 The new version of Windows.Forms from Microsoft in .NET 2.0 will have a
 WebBrowser control to embed a HTML renderer into form. Of course, Microsoft
 realization will be in the wrapper for Internet Explorer ActiveX element.
 
 Which realization will be maded in Mono Framework (and will any realization
 exist)?
 
 ---
 Andrew Sklyarevsky, Tashkent.
 mailto:[EMAIL PROTECTED]
 http://www.oridea.org/
 http://www.livejournal.com/users/snoralip/
 

There is such a control in .net 1.1 too. It's a wrapper of IE. I have
found an Mozilla/Gecko ActiveX control which can be used from .net
here:
http://www.iol.ie/~locka/mozilla/control.htm

Never tried it, but looks like a way to go :)

Cheers
Sunny
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-devel-list] Mono on a multipocessor

2005-04-21 Thread Sunny
On Thursday 21 April 2005 09:25, Alex Chudnovsky wrote:

 I found a solution (hack really) to make .NET programmatically change
 maximum limit of threads on Windows,

Would you be so kind to share it?

Sunny

-- 
Get Firefox
http://www.spreadfirefox.com/?q=affiliatesid=10745t=85
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-devel-list] Mono on a multipocessor

2005-04-21 Thread Sunny
On Thursday 21 April 2005 09:53, Alex Chudnovsky wrote:
 Sunny wrote:
 On Thursday 21 April 2005 09:25, Alex Chudnovsky wrote:
 I found a solution (hack really) to make .NET programmatically change
 maximum limit of threads on Windows,
 
 Would you be so kind to share it?

 Its here:
 http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=201

 Can confirm it works, something that made me feel very happy indeed when
 I run
 into that stupid 25 threads limit in .NET :-)

 Considering that async IO uses threads (something I never thought of
 until I run into it)
 25 limit is way too low and I thought I seen somewhere that Mono by
 default uses far more
 threads than quoted 25. My app SEEMS to be okay, but you never know as
 problem can
 manifest itself in timeouts that should not have happened otherwise.

 cheers

 Alex

Hi Alex,
thanks for the link, I'll take it a look.

According the limit, and how low it is, that's the way I think it is:
As someone in the list already mentioned, the threads in the ThreadPool are 
good for threads which are short in execution time. As far as creating a new 
thread has it's cost, you do not have to pay this cost for simple thinks. If 
you need a thread which is going to run longer, that it is better to spawn 
your own one.
I haven't gone deep in async socket communication, but what I understand (at 
least in .Net) is, that a thread is only occupied when performs actual work, 
but it is not blocked in waiting state. When a data becomes available, a new 
thread is picked to deal with that event. And actually if there are no free 
threads in the pool, the execution is queued until one is available. And this 
queue is fairly big, although I could not find information how much.
Yes, this does not help you when dealing with blocking sockets. So maybe it is 
better to implement your own dynamic size pool to handle this. Or, if these 
threads stay in blocked state very long, maybe you will find that just 
creating a thread when you need it is much reasonable, than keeping resources 
you do not need. For most of the other implementations, the thread pool is 
enough.
As I said, this is only my experience and understanding, and I haven't digged 
too deep in mono implementation, so please feel free to correct me.

Cheers
Sunny
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-devel-list] [OT] Netiquette in the list

2005-03-31 Thread Sunny
Hi,
is there a place I can read about the rules in this list? I see a lot
of messages both top and bottom quoted, I see HTML messages etc. And
actually what bothers me, is that in  the archives there are some
messages, in which every line ends with  =. What is this?

Also, what is the policy about replaying? To the list? Private? I
already posted a question and received both a private answer and
another one in the list. Do we have to keep the list volume low, and
skip some answers to the list?

Thanks
Sunny

-- 
Get Firefox
http://www.spreadfirefox.com/?q=affiliatesid=10745t=85
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list