Re: How to trigger other thread
- From: "aualias" <aualias@xxxxxxxxxxxxxxxxx>
- Date: Fri, 22 Jul 2005 20:52:11 -0400
Jon,
I can't get through to your website, but would like to see your solution.
Is your site down, or is the problem at my end?
I was assuming that there are only two threads in the application.
Obviously, if there are other threads, they will not be able to see the
variable if it is not static.
David
"Jon Skeet [C# MVP]" <skeet@xxxxxxxxx> wrote in message
news:MPG.1d4b34744d17f6a98c4e8@xxxxxxxxxxxxxxxxxxxxxxx
> Axel Dahmen <NO_SPAM@xxxxxxxxxxxxxxxxxx> wrote:
>> I've two threads in my program: 1) The original program thread and 2) a
>> worker thread.
>>
>> For simplicity my worker thread writes its output into the static
>> controls
>> and status bar by itself.
>
> <snip>
>
> It looks like your solution - at that provided by aualias - aren't
> thread-safe. They assume that when one thread changes the value of a
> variable, all other threads see that value change.
>
> See http://www.pobox.com/~skeet/csharp/threads/volatility.shtml for why
> that's a bad assumption, and
> http://www.pobox.com/~skeet/csharp/threads/shutdown.shtml for a cleaner
> way to shut down a thread.
>
> --
> Jon Skeet - <skeet@xxxxxxxxx>
> http://www.pobox.com/~skeet
> If replying to the group, please do not mail me too
.
- Follow-Ups:
- Re: How to trigger other thread
- From: Jon Skeet [C# MVP]
- Re: How to trigger other thread
- References:
- How to trigger other thread
- From: Axel Dahmen
- Re: How to trigger other thread
- From: Jon Skeet [C# MVP]
- How to trigger other thread
- Prev by Date: Re: Mona - Help!!! - or - Why won't my DataGridTableStyle apply?
- Next by Date: RE: MDI Client Repaint
- Previous by thread: Re: How to trigger other thread
- Next by thread: Re: How to trigger other thread
- Index(es):
Relevant Pages
|