{"author_name":"kagamihoge","title":"\u306f\u3058\u3081\u3066 java.util.concurrent \u306e API \u3092\u4f7f\u3063\u305f\u3000\u30b9\u30ea\u30fc\u30d7\u3068\u30ed\u30c3\u30af","height":"190","categories":["Java"],"author_url":"https://blog.hatena.ne.jp/kagamihoge/","blog_title":"kagamihoge\u306e\u65e5\u8a18","image_url":null,"published":"2011-04-22 19:05:39","url":"https://kagamihoge.hatenablog.com/entry/20110422/1303466739","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkagamihoge.hatenablog.com%2Fentry%2F20110422%2F1303466739\" title=\"\u306f\u3058\u3081\u3066 java.util.concurrent \u306e API \u3092\u4f7f\u3063\u305f\u3000\u30b9\u30ea\u30fc\u30d7\u3068\u30ed\u30c3\u30af - kagamihoge\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","width":"100%","version":"1.0","provider_name":"Hatena Blog","description":"\u307e\u305a\u306f\u30b9\u30ea\u30fc\u30d7\u3002 try { TimeUnit.SECONDS.sleep(5); } catch (InterruptedException e) { e.printStackTrace(); } TimeUnit#sleep \u306f\u3001javadoc \u3092\u898b\u308b\u3068\u5358\u306b Thread.sleep \u306e\u7c21\u6613\u547c\u3073\u51fa\u3057\u306b\u904e\u304e\u306a\u3044\u3089\u3057\u3044\u3002 \u3064\u304e\u306b\u30ed\u30c3\u30af\u3002 private ReentrantLock lock = new ReentrantLock(); private void lockSample() { lock.lock(); try { //\u30ed\u30c3\u30af\u3092\u304b\u3051\u3066\u51e6\u7406\u3057\u305f\u3044\u3053\u3068\u3092\u3053\u3053\u306b\u66f8\u304f } finally \u2026","blog_url":"https://kagamihoge.hatenablog.com/","type":"rich","provider_url":"https://hatena.blog"}