Other options would be to simply prevent Event B from firing (through the
UI) until Event A is finished, use a queue system for your events, or if you
want real thread synchronisation you can put

[MethodImpl(MethodImplOptions.Synchronized)]

Onto the method that you need to be un-interruptable.

On Sat, Feb 19, 2011 at 9:58 AM, Marcus <[email protected]> wrote:

> That is one idea, thanks for answering.
>
> But I want the to handler methods to be synchronous aswell.
> That is I want the handler of event A to finish before handler of
> event B begins its execution.
>
> I am not that used to thread programming, can I achieve what I need
> with threads?
> Or do I have to go another route?
>
>
> On 19 Feb, 10:43, Jamie Fraser <[email protected]> wrote:
> > Run the code in a separate thread?
> >
> >
> >
> > On Sat, Feb 19, 2011 at 9:36 AM, Marcus <[email protected]> wrote:
> > > I need the handler code of an event A to be non interruptable by the
> > > event B
> >
> > > Is there some way that I can ensure that all the of the code that
> > > handles event A is executed before event B is allowed to be
> > > triggered.
> >
> > > I mean some way to maybe pause the reporting of events in my app until
> > > the handler code of A has executed...
> >
> > > ...or is there some way to mark the handler code of event A to be non-
> > > interruptible by events?- Dölj citerad text -
> >
> > - Visa citerad text -

Reply via email to