diff options
author | jonmv <venstad@gmail.com> | 2023-11-30 09:49:39 +0100 |
---|---|---|
committer | jonmv <venstad@gmail.com> | 2023-11-30 09:49:39 +0100 |
commit | 7dde0ab9f6d19e25d55f1b1b4798f83b3ba6592d (patch) | |
tree | ae39de27a96e349c7da847af91ce9aea0c3c8276 /jrt/src | |
parent | 31c7fe405206f4aa86ecd0f93309f26adf2e1205 (diff) |
Add some warnings for unexpected scenarios
Diffstat (limited to 'jrt/src')
-rw-r--r-- | jrt/src/com/yahoo/jrt/TransportThread.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/jrt/src/com/yahoo/jrt/TransportThread.java b/jrt/src/com/yahoo/jrt/TransportThread.java index 68b7c23b36b..870d1ce7adc 100644 --- a/jrt/src/com/yahoo/jrt/TransportThread.java +++ b/jrt/src/com/yahoo/jrt/TransportThread.java @@ -296,6 +296,9 @@ public class TransportThread { */ public TransportThread sync() { SyncCmd cmd = new SyncCmd(); + if (Thread.currentThread() == thread) { + log.log(Level.WARNING, "Attempting to sync " + thread + " with itself, which will deadlock"); + } if (postCommand(cmd)) { cmd.waitDone(); } else { |