[Mono-dev] [PATCH] SoapHttpClientProtocol Thread Safety fix.

Alan McGovern alan.mcgovern at gmail.com
Sun Dec 2 08:14:26 EST 2007


Well, it is explicitly stated that instance members are not threadsafe by
default. If you're modifying an object from multiple threads simultaneously,
then you have a bug in your code (unless the docs for that object explicitly
state that the methods/properties you are using are threadsafe). Therefore a
patch which has 'thread safety' fixes for stuff that is not supposed to be
threadsafe doesn't make much sense. I think this is what Atsushi was saying.

Alan.

On Dec 2, 2007 12:57 PM, Arina Itkes <arinai at mainsoft.com> wrote:

> The previous code:
>
>                public string Url {
> -                       get { return url; }
> -                       set {
> -                               url = value;
> -                               uri = new Uri (url);
> -                       }
>
> can cause inconsistent values of uri and Url with multithreading work.
>
> -----Original Message-----
> From: mono-devel-list-bounces at lists.ximian.com
> [mailto:mono-devel-list-bounces at lists.ximian.com] On Behalf Of Atsushi
> Eno
> Sent: Thursday, November 29, 2007 11:07 PM
> To: mono-devel
> Subject: Re: [Mono-dev] [PATCH] SoapHttpClientProtocol Thread Safety
> fix.
>
> Well, I'm still not sure. Why is the Uri change related to the
> thread safety issue? I know that your patch had included the change.
> I was asking for the reason why.
>
> Atsushi Eno
>
> Arina Itkes wrote:
> > Fix for thread safety had included changes in Url property. It was
> made
> > with calling to property supported only by net 2.0. Now it supported
> by
> > net 1.0 too.
> >
> > -----Original Message-----
> > From: mono-devel-list-bounces at lists.ximian.com
> > [mailto:mono-devel-list-bounces at lists.ximian.com] On Behalf Of Atsushi
> > Eno
> > Sent: Tuesday, November 27, 2007 10:13 PM
> > To: mono-devel
> > Subject: Re: [Mono-dev] [PATCH] SoapHttpClientProtocol Thread Safety
> > fix.
> >
> > Hi,
> >
> > Please explain how come Uri is related to thread safety?
> >
> > Atsushi Eno
> >
> > Arina Itkes wrote:
> >> Please review additional fix for Url get property. Now it supported
> by
> >> NET_1_1 too.
> >>
> >> -----Original Message-----
> >> From: mono-devel-list-bounces at lists.ximian.com
> >> [mailto:mono-devel-list-bounces at lists.ximian.com] On Behalf Of Arina
> >> Itkes
> >> Sent: Thursday, November 15, 2007 2:57 PM
> >> To: mono-devel
> >> Subject: [Mono-dev] [PATCH] SoapHttpClientProtocol Thread Safety fix.
> >>
> >>      Hi all,
> >>
> >>      Please review the attached patch.
> >>
> >>      It contains synchronization fix for the class
> >> WebClientAsyncResult and light changes for the class
> WebClientProtocol
> >> that is a base of SoapHttpClientProtocol for thread safety purpose.
> >>
> >>
> >>
> >
> ------------------------------------------------------------------------
> >> _______________________________________________
> >> Mono-devel-list mailing list
> >> Mono-devel-list at lists.ximian.com
> >> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> >
> >
> > _______________________________________________
> > Mono-devel-list mailing list
> > Mono-devel-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-devel-list
> >
>
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20071202/e63c3e94/attachment.html 


More information about the Mono-devel-list mailing list