To my understanding, the non-thread-safe operations are the += and -= of the
event.
what if I make sure these only happen before I start the worker thread and
after it finishes working?
"Richard Blewett [DevelopMentor]" <richardb@NOSPAMdevelop.com> wrote in
message news:ukbXEEH7EHA.2016@TK2MSFTNGP15.phx.gbl...[color=blue]
> Theres no "in general" about it - it suggests there are situations where
> it is OK. Raising an event from the worker thread executes code on the
> worker thread that is part of the UI. YOU MUST NOT DO THIS. The mostr
> frustrating thing is that the WInforms classes don't tell you this ...
> until the next version, where in debug they will throw an exception.
>
> Regards
>
> Richard Blewett - DevelopMentor
>
http://www.dotnetconsult.co.uk/weblog
>
http://www.dotnetconsult.co.uk
>
> "Picho" <SPAM_picho@telhai.ac.il> schrieb:[color=green]
> > Herfried what do you say about my event drivven solution?[/color]
>
> In general, event driven solutions are not thread-safe too, but this
> depends
> on the implementation of the event. More information:
>
> <URL:http://www.google.de/groups?selm=%23XkWlYOuCHA.1656%40TK2MSFTNGP09>
>
>[/color]