[Mono-list] Monitor.cs
yoros@wanadoo.es
yoros@wanadoo.es
Mon, 6 Jan 2003 17:45:36 +0100
--BOKacYhQ+x31HxR3
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Mon, Jan 06, 2003 at 03:21:37PM +0000, Dick Porter wrote:
> On Sat, 2003-01-04 at 09:17, yoros@wanadoo.es wrote:
> > On Fri, Jan 03, 2003 at 08:03:50PM -0500, Miguel de Icaza wrote:
> > > * This pattern:
> > >=20
> > > - int ms=3DConvert.ToInt32(timeout.TotalMilliseconds);
> > > + double ms =3D timeout.TotalMilliseconds;
> > >=20
> > > But I am not sure about what this does, or why the change was need=
ed
> > > =09
> > > * This other:
> > >=20
> > > - // FIXME when I understand what a
> > > - // "synchronisation domain" is and does
> > > - return(false);
> > > + return Wait(obj,msi,exitContext);
>=20
> > 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.
>=20
> The correct fix here is to catch overflow exceptions, rather than change
> the variable to a double (because its just going to be given to another
> method that's expecting an int.)
Yes I know what you say and the int value is in "msi" variable. First I
get a double, check the range and then convert it to int (into msi).
>=20
> >=20
> > The second change does not correct the "FIXME" because that method
> > depends on Wait(obj,msi,exitContext)... and it is not FIXED.
>=20
> This should be throwing NotImplementedException.
Yes, of course, but when one of the two methods could be implemented,
the another is implemented automatically.
Please, take a look to the file that I posted in the list.
Thanks for your answer,
Pedro
--=20
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
--BOKacYhQ+x31HxR3
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+GbKwWIvihXTx06wRAneYAKDEyqYUUlpNbyroA6LGnYi3NGeo6wCgl4AF
CXQEapFodCiXkqVfZlrz/nQ=
=0Tj7
-----END PGP SIGNATURE-----
--BOKacYhQ+x31HxR3--