Tech Off Post

Single Post Permalink

View Thread: I was told today to not worry cross-thread execution when...
  • User profile image

    wkempf said:
    Minh said:
    The synchronization employed here is a "context switch via message queue".  Said message queue is one large lock.  I've seen code attempt to do automatic synchronization in this fashion, and it frequently results in deadlock.

    I've got no clue how (or if) Silverlight does automatic synchronization.  As someone who knows a lot about multi-threading, though, I can tell you that automatic synchronization is terrible for performance and can often lead to hard to discover dead locks.  That statement is relevant beyond the UI synchronization we're talking about here.

    Edit:  The first page I hit on Google suggests that Silverlight uses the exact same threading model that WPF does.

    This is not automatic synchronization.
    I could've sworn I saw a post from ScottGu contradicting Jeff's post (which was in March).... Let me see if I can hunt it down.