首页 \ 问答 \ Java线程转储:“等待锁定”和“停车等待”之间的区别?(Java thread dump: Difference between “waiting to lock” and “parking to wait for”?)

Java线程转储:“等待锁定”和“停车等待”之间的区别?(Java thread dump: Difference between “waiting to lock” and “parking to wait for”?)

在Java线程转储中,您可以看到堆栈跟踪中提到的锁。
似乎有三种信息:

1:

- locked <0x00002aab329f7fa0> (a java.io.BufferedInputStream)

2:

- waiting to lock <0x00002aaaf4ff6fa0> (a org.alfresco.repo.lock.LockServiceImpl)

3:

- parking to wait for  <0x00002aaafbf70bb8> (a java.util.concurrent.SynchronousQueue$TransferStack)
  • 1:线程已获得对象0x00002aab329f7fa0的锁定。
  • 2&3:似乎说线程正在等待所述对象的锁定变为可用...
    但是2和3有什么区别?

In a Java thread dump, you can see locks mentioned within stack traces.
There seems to be three kinds of information:

1:

- locked <0x00002aab329f7fa0> (a java.io.BufferedInputStream)

2:

- waiting to lock <0x00002aaaf4ff6fa0> (a org.alfresco.repo.lock.LockServiceImpl)

3:

- parking to wait for  <0x00002aaafbf70bb8> (a java.util.concurrent.SynchronousQueue$TransferStack)
  • 1: The thread has obtained a lock on object 0x00002aab329f7fa0.
  • 2&3: Seem to say that the thread is waiting for the lock on said object to become available...
    but what is the difference 2 and 3?

原文:https://stackoverflow.com/questions/11337384
更新时间:2023-08-06 15:08

最满意答案

窗口小部件堆叠顺序由它们在QObject层次结构树中的顺序定义。 第一个元素是底部,下一个元素位于前一个元素的顶部。 孩子们在他们的父母之上,在限制在他们的范围内的小部件,在QML免费。

如果您希望滑动元素出现在其他所有内容之上,只需将其父级放在其他所有内容之上。

毕竟它位于播放列表顶部的底部控制栏的顶部,因此您可以完成所有操作。

如果您决定做更明智的事情并使用QML而不是QWidget ,则同样适用。 那里的动画和状态要容易得多。 更不用说更具体的设计了。


The widgets stacking order is defined by their order in the QObject hierarchy tree. The first element is the bottom, and every next is on top of the previous. Children are on top of their parents, in widgets confined within their bounds, in QML free.

If you want that sliding element to appear on top of everything else, just put its parent on top of everything else.

After all it is on top of the bottom control bar, which is on top of the playlist, so you have it all worked out for you.

The same applies if you decide to do the wiser thing and use QML instead of QWidget. Animation and states are much easier there. Not to mention more specific designs.

相关问答

更多
  • 窗口小部件堆叠顺序由它们在QObject层次结构树中的顺序定义。 第一个元素是底部,下一个元素位于前一个元素的顶部。 孩子们在他们的父母之上,在限制在他们的范围内的小部件,在QML免费。 如果您希望滑动元素出现在其他所有内容之上,只需将其父级放在其他所有内容之上。 毕竟它位于播放列表顶部的底部控制栏的顶部,因此您可以完成所有操作。 如果您决定做更明智的事情并使用QML而不是QWidget ,则同样适用。 那里的动画和状态要容易得多。 更不用说更具体的设计了。 The widgets stacking ord ...
  • 从技术上讲,HTML中没有组合框,因为无法将元素的功能: 激活后,它会显示(下拉)一系列值,用户可以从中选择一个值。 所以你的老人是对的。 Technically, there are no combo boxes in HTML, becau ...
  • 更改div“get-started”的位置是从相对于绝对值到底部是0.如果在div“get-started”中给出“top:0px”,则下拉菜单将从上到下打开。 这是代码: body{background:#000;} .get-started { width: 100%; height: 100%; background: rgb(255, 0, 101); color: #fff; position:absolute; bottom:0; padding-bo ...
  • 这是一个可以做你想要的例子。 基本上,您可以使用jQuery / AJAX来实现此目的。 我更新了我的示例代码以匹配您的服务器登录/表/字段名称,因此如果您将这两个示例复制/粘贴到文件中(称为tester.php和another_php_file.php ),那么您应该有一个完整的示例来使用。 我修改了下面的示例以创建第二个下拉框,填充了找到的值。 如果你逐行遵循逻辑,你会发现它实际上非常简单。 我留下了几条注释行,如果取消注释(一次一个),将显示脚本在每个阶段正在做什么。 文件1 - TESTER.PHP ...
  • 组合框在格式部分有两个属性可以实现这一点。 List Rows控制列出了多少项目,以及在开始滚动之前下拉的高度。 List Width将控制您的盒子的Width而Width将控制组合框在您的表格上显示的大小。 The combo box has two properties in the format section that will accomplish this. The List Rows controls how many items are listed and how tall the dro ...
  • 你可以将整个东西包裹在一个弹性盒子中,然后让身体弹性填充剩下的空间,从而将页脚放在页脚级别。 当你响应时也会“出现”工作。 但是,此刻这种感觉很不好,就好像你在柔性盒子容器周围画一个边框一样,它只能适应原来的100%的水平。 $('#drop-up-open').click(function() { $('#drop-up #drop-upDashboard').slideToggle({ direction: "up" }, 300); $(this).toggleClass( ...
  • 这是一个简单的下拉内容,你用jQuery描述的内容: http : //jsfiddle.net/t9hq9/19/你可以用你的底部图像替换我的#bottom ,我的只是用带有border-radius的css。 HTML:
    CONTENT
    CSS: #content { width: 400px; border-left: 10px solid #FA802F; border-right: 10px soli ...
  • 这不可能仅使用HTML,因为它将提交下拉框和输入框的值。 如果两个字段都被命名为“address”,它将提交到您的php页面并保存在一个数组中。 在我看来,如果未选择该选项,HTML页面上的某些javascript可能会隐藏输入框。 This is not possible solely with HTML, as it would submit the values of both the drop down box and the input box. If both fields were named ...
  • 更改position: fixed为position: absolute ,并为.dropdown-content设置left和bottom位置, .dropdown-content li设置为position: relative; ul li { position: relative; } .dropdown-content { display: none; position: absolute; bottom: 30px; /* or something */ le ...
  • 您可以通过从QDesktopWidget查询来动态设置屏幕大小。 QRect r = QApplication::desktop()->screenGeometry(); int h = r.height(); int w = r.width(); Qt布局系统提供了一种简单而强大的方法,可以在窗口小部件中自动排列子窗口小部件,以确保它们充分利用可用空间。 请参阅下面的示例代码,该代码采用全屏幕并将该空间拆分为文本标签和按钮。 您可以调整窗口大小,直到小部件的最小大小限制为止。 mainwindow.h ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。