[Mono-list] Monitor.cs

yoros@wanadoo.es yoros@wanadoo.es
Sat, 4 Jan 2003 10:17:00 +0100

Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Jan 03, 2003 at 08:03:50PM -0500, Miguel de Icaza wrote:
> Hello Pedro,
> > I was looking the source of System.Threading.Monitor class and I saw a
> > few mistakes (I think that they are mistakes). I changed that file and
> > the new one is attached to this mail. Please, see it and tell me what do
> > you think about.
> Could you provide a ChangeLog for your changes?  I looked over it, and I
> noticed:
> 	* re-format changes.
> 	* This pattern:
> -			int ms=3DConvert.ToInt32(timeout.TotalMilliseconds);
> +			double ms =3D timeout.TotalMilliseconds;
> 	  But I am not sure about what this does, or why the change was needed
> =09
> 	* This other:
> -			// FIXME when I understand what a
> -			// "synchronisation domain" is and does
> -			return(false);
> +			return Wait(obj,msi,exitContext);
> 	  This seems to be the main fix in the patch, is that what you were fixi=
> 	  What was the problem that this patch fixes?

The first change is about converting timeout.TotalMilliseconds from
double to int32 without checking if that number (in the double format)
can be represented with a int32 format. I think that the best way to
have control about the exceptions thrown when the function gets a double
greather than Int32.MaxValue.

The second change does not correct the "FIXME" because that method
depends on Wait(obj,msi,exitContext)... and it is not FIXED.

I sent this file only to comment the problem and, if I'm right, show to
the mantainer of that file a little change...

See you,


Pedro Martinez Juli=E1
\  yoros@terra.es
)|    yoros@wanadoo.es
/        http://yoros.cjb.net
Socio HispaLinux #311
Usuario Linux #275438 - http://counter.li.org
GnuPG public information:  pub  1024D/74F1D3AC
Key fingerprint =3D 8431 7B47 D2B4 5A46 5F8E  534F 588B E285 74F1 D3AC

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.2.1 (GNU/Linux)