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
最满意答案
窗口小部件堆叠顺序由它们在
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 ofQWidget
. Animation and states are much easier there. Not to mention more specific designs.
相关问答
更多-
Qt覆盖(下拉)框(Qt overlay(drop-up) box)[2023-08-05]
窗口小部件堆叠顺序由它们在QObject层次结构树中的顺序定义。 第一个元素是底部,下一个元素位于前一个元素的顶部。 孩子们在他们的父母之上,在限制在他们的范围内的小部件,在QML免费。 如果您希望滑动元素出现在其他所有内容之上,只需将其父级放在其他所有内容之上。 毕竟它位于播放列表顶部的底部控制栏的顶部,因此您可以完成所有操作。 如果您决定做更明智的事情并使用QML而不是QWidget ,则同样适用。 那里的动画和状态要容易得多。 更不用说更具体的设计了。 The widgets stacking ord ... -
从技术上讲,HTML中没有组合框,因为无法将
-
更改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 ...
-
动态下拉框?(dynamic drop down box?)[2023-09-22]
这是一个可以做你想要的例子。 基本上,您可以使用jQuery / AJAX来实现此目的。 我更新了我的示例代码以匹配您的服务器登录/表/字段名称,因此如果您将这两个示例复制/粘贴到文件中(称为tester.php和another_php_file.php ),那么您应该有一个完整的示例来使用。 我修改了下面的示例以创建第二个下拉框,填充了找到的值。 如果你逐行遵循逻辑,你会发现它实际上非常简单。 我留下了几条注释行,如果取消注释(一次一个),将显示脚本在每个阶段正在做什么。 文件1 - TESTER.PHP ... -
组合框和下拉大小(Combo box and Drop Down size)[2019-08-05]
组合框在格式部分有两个属性可以实现这一点。 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( ...
-
如何创建此下拉框(How to create this drop down box)[2022-04-04]
这是一个简单的下拉内容,你用jQuery描述的内容: http : //jsfiddle.net/t9hq9/19/你可以用你的底部图像替换我的#bottom ,我的只是用带有border-radius的css。 HTML:CONTENTCSS: #content { width: 400px; border-left: 10px solid #FA802F; border-right: 10px soli ... -
表单下拉输入框(forms drop down with input box)[2023-02-24]
这不可能仅使用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 ... -
CSS下拉菜单问题(CSS Drop-Up Menu Questions)[2022-09-03]
更改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 ...