Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SwingUtilities.invokeLater hang or deadlock



Michael Hall wrote:

>...To
>completely eliminate the possibility of a deadlock between the
>application thread and either of the AWT threads wouldn't it need a
>priority of 4?

It's impossible to eliminate deadlock possibilities by juggling priorities.
I mean that in both an analytical/theoretical sense, as well as a
real-world practical sense.  At best, juggling priorities will only shift
when or where the conditions arise that lead to deadlock.  The problem is
only shifted, though, not eliminated.  I have seen such attempts actually
cause the deadlock to occur more often ("The best-laid schemes..." and all).

To eliminate the problem, the same sequence of lock acquisition must be
used everywhere.  That means code has to be changed.


Ben Galbraith wrote:

>Have we already discussed what exactly the Runnable submitted by
>Thread-39 is doing? Can you submit the source of that Runnable, please?

See the list archives:
  <http://lists.apple.com/archives/java-dev/2006/Jan/msg00142.html>
    4. "It doesn't matter what the code in the Runnable() is."

  -- GG


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.