Does a method marshalled on the UI Thread need to be thread-safe

Viewed 194

If I Invoke a method onto the UI Thread is it searilized by the Windows message queue and subsequently doesn't need to be re-entrant?

    private void CalledFromWorkerThread()
    {
        //changed from 'InvokeRequired' Anti-Pattern
        this.Invoke((Action) (() => _counter++; /* Is this ok? */ ));
    }

Clarification: It is only the UI thread that will be accessing _counter.

3 Answers
Related