强制解锁可重入锁定(Force unlocking a reentrant lock)
我有一个可重入的锁,我根据自己的需要包装在一个定制的课程中。 但是,由于应用程序的性质,将锁定到可重入锁定的线程卡住(外部故障)并且无法释放重入锁定。
我想知道是否有一种方法可以明确解锁重入锁? 我知道可重入锁的API没有这样的方法 - 但是我想要引入一个计时器任务,它将在一段时间后解锁重入锁或者杀死保存可重入锁的线程。
试图强制解锁我的折返锁定的任何其他建议? 我问我的解决方案非常好。
I have a reentrant lock which I am wrapping in a customized class for my own needs. However due to the nature of the application a thread holding the lock to the reentrant lock gets stuck (external failures) and fails to release the reentrant lock.
I am wondering if there is a method to explicitly unlock the reentrant lock? I know the API for Reentrant lock does not have such a method - however I was thinking of introducing a timer task which will unlock the Reentrant lock after a set period of time OR kill the thread which holds the reentrant lock.
Any other suggestions in trying to force unlock my reentrant lock? My solutions are pretty thus I ask.
原文:https://stackoverflow.com/questions/12791797
最满意答案
我没有尝试过很多因为我对jQuery UI Dialog感到满意。 您是否有可以指导推荐的特定需求?
I haven't tried many of them because I've been happy with the jQuery UI Dialog. Do you have specific needs that could guide a recommendation?
相关问答
更多-
您必须在用户与站点之间找到一个中间程序,以将视频转换为通用格式进行播放。 为所有文件格式查找jQuery程序毫无意义,因为它们有很多。 YouTube快速解决了这个问题, 并将所有文件转换为FLV文件进行播放。 最常见的视频文件格式是MPEG4。 它现在广泛用于HTML5视频播放器,因为它可以在所有浏览器和设备上查看。 你可以: 将所有视频都上传为mp4文件 将所有视频在上传之间转换为使用CloudConvert API等服务进行播放 希望这有帮助! You would have to find a mid ...
-
您需要使用ajax发送请求,从标记中删除操作并使用jQuery,AngularJS或类似的javascript框架向服务器发送请求。 在成功方法中,您可以隐藏/显示面板以删除控件并显示感谢信息。
Signuo testpage 在小睡之后,我挖掘了插件使用的不同js库,并通过调整modalbox插件的css文件中的z-indices来解决问题。 猜猜有时你只需要暂停,如果你没有看到明显的;) After taking a nap, I dug into the different js libraries used by the plugins and resolved the issue by adjusting the z-indices in the css file for the modalbox plugin. Gue ...我没有尝试过很多因为我对jQuery UI Dialog感到满意。 您是否有可以指导推荐的特定需求? I haven't tried many of them because I've been happy with the jQuery UI Dialog. Do you have specific needs that could guide a recommendation?上次我搞砸了Flash上的一个div(这里发生了什么)我可以让它在除Linux之外的所有平台上工作。 您使用的是Linux发行版吗? 如果不是解决方案通常是为嵌入添加wmode =“transparent”。 否则,唯一的解决方案是设置.style.display =“none”; 只要显示Modalbox,就会在FusionChart上显示.style.display =“”; 当Modalbox关闭时。 Last time I messed with overlaying a div on top of ...好的,问题在于: data-fv-notempty="True"该值应以小写形式写入: data-fv-notempty="true" Ok, the problem is here: data-fv-notempty="True" The value should be written in lower-case: data-fv-notempty="true"JQuery如何在按钮点击时发起modalbox(对话框)(JQuery how to instigate modalbox (dialog) on button click)[2021-09-25]
JSFiddle非常有帮助! 我为模态框添加了一些HTML,隐藏了它的CSS,以及javascript来初始化它并将它链接到你已经为它设置的点击处理程序。 这是这些新增内容的结果 。 HTML:确保来自ajax调用的插入元素具有模式脚本将查找的正确属性(rel =“leanModal”)。 将ajax数据插入页面后,您应该将模态代码分配给新元素; $('a[rel*=leanModal]').leanModal({ top : 200, closeButton: ".modal_close" }); Ensure that the inserted elements from the ajax call have the correct attributes (rel="leanModal ...关于jQuery插件开发,你可以阅读的最好的资源可能是learnjquery.com的插件开发模式: http://www.learningjquery.com/2007/10/a-plugin-development-pattern 当然, 从jQuery UI查看官方的jQuery插件开发指南及其等价物并不会有什么坏处。 并且给你一个(非常)小小的洞察力......如果你不是jQuery的新手,插件开发真的很容易。 基本上,它就像 $.fn.myPlugin = function() { // Pl ...如文档所示,组件具有[(visible)]属性。 它是双绑定的,因此您可以通过将上述属性的值设置为false来实际关闭(或隐藏)元素。 例: 相关文章
更多- solr 做索引时报 Lock obtain timed out: SingleInstanceLock: write.lock
- [转]So You Want To Be A Producer
- a favorite song
- Create a Bootable MicroSD Card
- Becoming a data scientist
- trouble is a friend
- Fading Like a Flower - Roxette
- 按钮样式
- Lucene + Hadoop 分布式搜索运行框架 Nut 1.0a9
- Lucene + Hadoop 分布式搜索运行框架 Nut 1.0a8
最新问答
更多- h2元素推动其他h2和div。(h2 element pushing other h2 and div down. two divs, two headers, and they're wrapped within a parent div)
- 创建一个功能(Create a function)
- 我投了份简历,是电脑编程方面的学徒,面试时说要培训三个月,前面
- PDO语句不显示获取的结果(PDOstatement not displaying fetched results)
- Qt冻结循环的原因?(Qt freezing cause of the loop?)
- TableView重复youtube-api结果(TableView Repeating youtube-api result)
- 如何使用自由职业者帐户登录我的php网站?(How can I login into my php website using freelancer account? [closed])
- SQL Server 2014版本支持的最大数据库数(Maximum number of databases supported by SQL Server 2014 editions)
- 我如何获得DynamicJasper 3.1.2(或更高版本)的Maven仓库?(How do I get the maven repository for DynamicJasper 3.1.2 (or higher)?)
- 以编程方式创建UITableView(Creating a UITableView Programmatically)
- 如何打破按钮上的生命周期循环(How to break do-while loop on button)
- C#使用EF访问MVC上的部分类的自定义属性(C# access custom attributes of a partial class on MVC with EF)
- 如何获得facebook app的publish_stream权限?(How to get publish_stream permissions for facebook app?)
- 如何防止调用冗余函数的postgres视图(how to prevent postgres views calling redundant functions)
- Sql Server在欧洲获取当前日期时间(Sql Server get current date time in Europe)
- 设置kotlin扩展名(Setting a kotlin extension)
- 如何并排放置两个元件?(How to position two elements side by side?)
- 如何在vim中启用python3?(How to enable python3 in vim?)
- 在MySQL和/或多列中使用多个表用于Rails应用程序(Using multiple tables in MySQL and/or multiple columns for a Rails application)
- 如何隐藏谷歌地图上的登录按钮?(How to hide the Sign in button from Google maps?)
- Mysql左连接旋转90°表(Mysql Left join rotate 90° table)
- dedecms如何安装?
- 在哪儿学计算机最好?
- 学php哪个的书 最好,本人菜鸟
- 触摸时不要突出显示表格视图行(Do not highlight table view row when touched)
- 如何覆盖错误堆栈getter(How to override Error stack getter)
- 带有ImageMagick和许多图像的GIF动画(GIF animation with ImageMagick and many images)
- USSD INTERFACE - > java web应用程序通信(USSD INTERFACE -> java web app communication)
- 电脑高中毕业学习去哪里培训
- 正则表达式验证SMTP响应(Regex to validate SMTP Responses)