Re: Simple race condition that I can't solve.

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I wrote:

[snip]

Weird -- if I use BeginInvoke instead of Invoke, it completes without error
(tried it about 20 times). If I change that back to Invoke, I get an error
every time.

Weirder -- when I use BeginInvoke, I don't even have to test /closed/. I
can remove the /if (!closed)/ statement and *still* I don't get any errors.

Hmm...
.



Relevant Pages

  • Re: question rephrased
    ... throw new RuntimeException(); ... The assumption that your library doesn't invoke its own public methods ...
    (comp.lang.java.help)
  • Re: Simple race condition that I cant solve.
    ... If I change that back to Invoke, ... BeginInvoke() (tested by putting a breakpoint in HandleFinished and seeing ... Prev by Date: ...
    (microsoft.public.dotnet.framework)
  • Re: Cannot set AllowDrop from a callback
    ... with Invoke() instead of asynchronously with BeginInvoke(). ... Real Software ... Prev by Date: ...
    (microsoft.public.dotnet.general)
  • Re: Simple race condition that I cant solve.
    ... Just off the top of my head, would it be better to check the closed ... Then Invoke is called, ... > thrown. ...
    (microsoft.public.dotnet.framework)
  • Re: Control.BeginInvoke
    ... > When you call Invoke, the method blocks until the call has been ... If you call BeginInvoke, the call is invoked ...
    (microsoft.public.dotnet.languages.csharp)