thread.html

来自「j2se5-api-zh,java文档的中文版本」· HTML 代码 · 共 521 行 · 第 1/3 页

HTML
521
字号
<TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../util/Collection.html" title="java.util 中的接口">Collection</A>&lt;<A HREF="../Thread.html" title="java.lang 中的类">Thread</A>&gt;</CODE></FONT></TD><TD><CODE><B>ReentrantLock.</B><B><A HREF="../../util/concurrent/locks/ReentrantLock.html#getQueuedThreads()">getQueuedThreads</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回一个 collection,它包含可能正等待获取此锁定的线程。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../util/Collection.html" title="java.util 中的接口">Collection</A>&lt;<A HREF="../Thread.html" title="java.lang 中的类">Thread</A>&gt;</CODE></FONT></TD><TD><CODE><B>AbstractQueuedSynchronizer.</B><B><A HREF="../../util/concurrent/locks/AbstractQueuedSynchronizer.html#getQueuedThreads()">getQueuedThreads</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回包含可能正在等待获取的线程 collection。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../util/Collection.html" title="java.util 中的接口">Collection</A>&lt;<A HREF="../Thread.html" title="java.lang 中的类">Thread</A>&gt;</CODE></FONT></TD><TD><CODE><B>ReentrantReadWriteLock.</B><B><A HREF="../../util/concurrent/locks/ReentrantReadWriteLock.html#getQueuedThreads()">getQueuedThreads</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回一个 collection,它包含可能正在等待获取读取或写入锁定的线程。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../util/Collection.html" title="java.util 中的接口">Collection</A>&lt;<A HREF="../Thread.html" title="java.lang 中的类">Thread</A>&gt;</CODE></FONT></TD><TD><CODE><B>ReentrantReadWriteLock.</B><B><A HREF="../../util/concurrent/locks/ReentrantReadWriteLock.html#getQueuedWriterThreads()">getQueuedWriterThreads</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回一个 collection,它包含可能正在等待获取写入锁定的线程。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../util/Collection.html" title="java.util 中的接口">Collection</A>&lt;<A HREF="../Thread.html" title="java.lang 中的类">Thread</A>&gt;</CODE></FONT></TD><TD><CODE><B>AbstractQueuedSynchronizer.</B><B><A HREF="../../util/concurrent/locks/AbstractQueuedSynchronizer.html#getSharedQueuedThreads()">getSharedQueuedThreads</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回包含可能正以共享模式等待获取的线程 collection。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../util/Collection.html" title="java.util 中的接口">Collection</A>&lt;<A HREF="../Thread.html" title="java.lang 中的类">Thread</A>&gt;</CODE></FONT></TD><TD><CODE><B>AbstractQueuedSynchronizer.ConditionObject.</B><B><A HREF="../../util/concurrent/locks/AbstractQueuedSynchronizer.ConditionObject.html#getWaitingThreads()">getWaitingThreads</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回包含那些可能正在等待此条件的线程 collection。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../util/Collection.html" title="java.util 中的接口">Collection</A>&lt;<A HREF="../Thread.html" title="java.lang 中的类">Thread</A>&gt;</CODE></FONT></TD><TD><CODE><B>AbstractQueuedSynchronizer.</B><B><A HREF="../../util/concurrent/locks/AbstractQueuedSynchronizer.html#getWaitingThreads(java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject)">getWaitingThreads</A></B>(<A HREF="../../util/concurrent/locks/AbstractQueuedSynchronizer.ConditionObject.html" title="java.util.concurrent.locks 中的类">AbstractQueuedSynchronizer.ConditionObject</A>&nbsp;condition)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回一个 collection,其中包含可能正在等待与此同步器有关的给定条件的那些线程。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../util/Collection.html" title="java.util 中的接口">Collection</A>&lt;<A HREF="../Thread.html" title="java.lang 中的类">Thread</A>&gt;</CODE></FONT></TD><TD><CODE><B>ReentrantLock.</B><B><A HREF="../../util/concurrent/locks/ReentrantLock.html#getWaitingThreads(java.util.concurrent.locks.Condition)">getWaitingThreads</A></B>(<A HREF="../../util/concurrent/locks/Condition.html" title="java.util.concurrent.locks 中的接口">Condition</A>&nbsp;condition)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回一个 collection,它包含可能正在等待与此锁定相关给定条件的那些线程。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../util/Collection.html" title="java.util 中的接口">Collection</A>&lt;<A HREF="../Thread.html" title="java.lang 中的类">Thread</A>&gt;</CODE></FONT></TD><TD><CODE><B>ReentrantReadWriteLock.</B><B><A HREF="../../util/concurrent/locks/ReentrantReadWriteLock.html#getWaitingThreads(java.util.concurrent.locks.Condition)">getWaitingThreads</A></B>(<A HREF="../../util/concurrent/locks/Condition.html" title="java.util.concurrent.locks 中的接口">Condition</A>&nbsp;condition)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回一个 collection,它包含可能正在等待与写入锁定相关的给定条件的那些线程。</TD></TR></TABLE>&nbsp;<P><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"><TH ALIGN="left" COLSPAN="2">参数类型为 <A HREF="../Thread.html" title="java.lang 中的类">Thread</A> 的 <A HREF="../../util/concurrent/locks/package-summary.html">java.util.concurrent.locks</A> 中的方法</FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B>ReentrantLock.</B><B><A HREF="../../util/concurrent/locks/ReentrantLock.html#hasQueuedThread(java.lang.Thread)">hasQueuedThread</A></B>(<A HREF="../Thread.html" title="java.lang 中的类">Thread</A>&nbsp;thread)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;查询给定线程是否正在等待获取此锁定。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B>ReentrantReadWriteLock.</B><B><A HREF="../../util/concurrent/locks/ReentrantReadWriteLock.html#hasQueuedThread(java.lang.Thread)">hasQueuedThread</A></B>(<A HREF="../Thread.html" title="java.lang 中的类">Thread</A>&nbsp;thread)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;查询是否给定线程正在等待获取读取或写入锁定。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B>AbstractQueuedSynchronizer.</B><B><A HREF="../../util/concurrent/locks/AbstractQueuedSynchronizer.html#isQueued(java.lang.Thread)">isQueued</A></B>(<A HREF="../Thread.html" title="java.lang 中的类">Thread</A>&nbsp;thread)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;如果给定线程目前已加入队列,则返回 true。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B>LockSupport.</B><B><A HREF="../../util/concurrent/locks/LockSupport.html#unpark(java.lang.Thread)">unpark</A></B>(<A HREF="../Thread.html" title="java.lang 中的类">Thread</A>&nbsp;thread)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;如果给定线程的许可尚不可用,则使其可用。</TD></TR></TABLE>&nbsp;<P><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="跳过导航链接"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>概述</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>软件包</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../Thread.html" title="java.lang 中的类"><FONT CLASS="NavBarFont1"><B>类</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>使用</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>树</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>已过时</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>索引</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>帮助</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Standard&nbsp;Ed. 5.0</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;上一个&nbsp;&nbsp;下一个</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html@java_2Flang_2F_2Fclass-useThread.html" target="_top"><B>框架</B></A>  &nbsp;&nbsp;<A HREF="Thread.html" target="_top"><B>无框架</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>所有类</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../../allclasses-noframe.html"><B>所有类</B></A></NOSCRIPT></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><font size="-1"><a href="../../../../../../../../../java.sun.com/cgi-bin/bugreport.cgi">提交错误或意见</a><br>有关更多的 API 参考资料和开发人员文档,请参阅 <a href="../../../../../../../../../java.sun.com/j2se/1.5.0/docs/relnotes/devdocs-vs-specs.html">Java 2 SDK SE 开发人员文档</a>。该文档包含更详细的、面向开发人员的描述,以及总体概述、术语定义、使用技巧和工作代码示例。 <p>版权所有 2004 Sun Microsystems, Inc. 保留所有权利。 请遵守<a href="../../../../../../../../../java.sun.com/j2se/1.5.0/docs/relnotes/license.html">许可证条款</a>。另请参阅<a href="../../../../../../../../../java.sun.com/docs/redist.html">文档重新分发政策</a>。</font></BODY></HTML>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?