I could be wrong but it seems to me that this is just an issue with the way help files 
are generated.
Here is what I mean:
1. Look at the help for Control.BeginInvoke method. The note there says:
"Note   The BeginInvoke method calls the specified delegate back on a different thread 
pool thread. You should not block a thread pool thread for any length of time."
Thread pool ????? The whole point of calling Control.BeginInvoke is to be called on 
GUI thread. So I would have to conclude that the docs are not precise.
2. Maybe other doc is also not precise?


-----Original Message-----
From: Moderated discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED]] On Behalf Of Mike Woodring
(DevelopMentor)
Sent: sabato 15 febbraio 2003 1.01
To: [EMAIL PROTECTED]
Subject: Re: [ADVANCED-DOTNET] delegate vs threadpool


> Just to add a result from a little test program I wrote: there is no
> evidence of any memory/resource leak. Even calling 1.000.000
> BeginInvoke on many Delegate.

No matter what your tests (and mine) show, the fact is that the runtime
team has "reserved the right" to leak if you don't call EndInvoke.
They've stated this in support calls and have taken explicit steps in
the 1.1 SDK to document that calling EndInvoke is required.

The result is that just because your code isn't leaking detectably today
doesn't mean it might not start leaking on a future version/service-pack
of the runtime.  If the docs say you must call EndInvoke (which they do
starting with the 1.1 docs), then anyone not calling EndInvoke is doing
so at their own risk.

By putting the explicit mandate in the docs, the runtime has eliminated
any liability on their part if applications that don't call EndInvoke
start to experience leaks/problems.  It will be our fault instead of
theirs.

It sucks, but there you have it.

-Mike
DevelopMentor
http://staff.develop.com/woodring

This message is for the named person's use only. It may contain sensitive and private 
proprietary or legally privileged information. No confidentiality or privilege is 
waived or lost by any mistransmission. If you are not the intended recipient, please 
immediately delete it and all copies of it from your system, destroy any hard copies 
of it and notify the sender. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the intended 
recipient. CREDIT SUISSE GROUP and each legal entity in the CREDIT SUISSE FIRST BOSTON 
or CREDIT SUISSE ASSET MANAGEMENT business units of CREDIT SUISSE FIRST BOSTON reserve 
the right to monitor all e-mail communications through its networks. Any views 
expressed in this message are those of the individual sender, except where the message 
states otherwise and the sender is authorized to state them to be the views of any 
such entity.
Unless otherwise stated, any pricing information given in this message is indicative  
only, is subject to change and does not constitute an offer to deal at any price 
quoted. Any reference to the terms of executed transactions should be treated as  
preliminary only and subject to our formal written confirmation.

Reply via email to