代码编织梦想

Patches

README for 35042068
Patch Details 
Patch 35042068 - Database Release Update 19.19.0.0.230418
 

Oracle® Database

Patch 35042068 - Database Release Update 19.19.0.0.230418

This document is accurate at the time of release. For any changes and additional information regarding Database Release Update 19.19.0.0.230418, see these related documents that are available at My Oracle Support (My Oracle Support):

  • Document 19202304.9 Oracle DB/GI/OJVM Update/Revision R19 Apr 2023 Known Issues

  • Document 555.1 Oracle Database 19c Important Recommended One-off Patches

  • Document 888.1 Primary Note for Database Proactive Patch Program

  • Document 1919.2 19c Database Self-Guided Upgrade with Best Practices

This document includes the following sections:

1 Patch Information

  • Database Release Update 19.19.0.0.230418 patches are cumulative. That is, the content of all previous Database bundles is included in the latest Database bundle patch.

  • To install the Database Release Update 19.19.0.0.230418 patch, the Oracle home must have Oracle Database release 19c installed.

  • This patch is Oracle RAC Rolling Installable.

  • This patch is Database Vault installable. Review My Oracle Support Document 1195205.1 for details on how to apply this patch to a Database Vault environment.

  • This patch is Data Guard Standby-First Installable. See My Oracle Support Document 1265700.1 Oracle Patch Assurance - Data Guard Standby-First Patch Apply for details on how to remove risk and reduce downtime when applying this patch.

  • This patch includes the JDK fixes released in the prior cycle and will update the JDK in the Oracle home. For the most recent JDK fixes, a separate patch is available and needs to be installed in addition to this patch. Refer to My Oracle Support document 888.1 - Primary Note for Database Proactive Patch Program for the JDK patch number.

  • This DBRU contains the following CORE DST patches:

    • 28852325 - DSTV33 UPDATE - TZDATA2018G
    • 29997937 - DSTV34 UPDATE - TZDATA2019B
    • 31335037 - DSTV35 UPDATE - TZDATA2020A
    • 32327201 - DSTV36 UPDATE - TZDATA2020E
    • 33613829 - DSTV37 UPDATE - TZDATA2021E
    • 34006614 - DSTV38 UPDATE - TZDATA2022A
    • 34533061 - DSTV39 UPDATE - TZDATA2022C
    • 34698179 - DSTV40 UPDATE - TZDATA2022E
    • 35099667 - DSTV41 UPDATE - TZDATA2022G

    Applying this Release Update (RU) does not change the DST version in any of your databases. The DST patches are only copied into $ORACLE_HOME/oracore/zoneinfo and no DST upgrade is performed. You can decide to upgrade the DST version in your database to a newer DST version independently of applying the RU at any time. Be aware that this incurs downtime.

    If you plan to adjust the DST version of your databases, Oracle recommends adjusting it to the latest available DST version. Then follow the instructions in the Oracle 19c Oracle Database Upgrade Guide.

    Note: New DST one-off patch updates, that are made externally available within the last six weeks of the 19.19 release cycle, are not included in this Release Update. They will be included in the next Release Update. This means that DSTV42, which gets externally released within the last six weeks of the 19.19 (18-Apr-2023) release, will be included in the 19.20 (18-Jul-2023) Release Update.

    For more information on various DST patch releases, refer to My Oracle Support document 412160.1 Primary Note DST FAQ: Updated DST Transitions and New Time Zones in Oracle RDBMS and OJVM Time Zone File Patches.

  • Any new or changed database initialization parameters that might be included into a quarterly patch bundle would be documented in the Oracle Database Reference manual section on initialization parameters. For Oracle Database 19c, refer to Oracle Database Reference.

  • For the latest Update with Security Fixes that should be used on Client-Only installations, refer to the Critical Patch Update (CPU) Program Patch Availability Document (PAD) section on the Oracle Database, for the cycle in which you are interested.

2 Prerequisites

It is highly recommended to take a backup of the Oracle_Home binaries and Central Inventory prior to applying patches. For further information, refer to Note 565017.1.

This section includes the following section:

2.1 OPatch Utility

You must use the OPatch utility version 12.2.0.1.36 or later to apply this patch. Oracle recommends that you use the latest released OPatch version for 12.2, which is available for download from My Oracle Support patch 6880880 by selecting ARU link for the 12.2.0.1.0 OPatch release. It is recommended that you download the OPatch utility and the patch in a shared location to be able to access them from any node in the cluster for the patch application on each node.

When patching the GI home, a shared locaton on Oracle ACFS only needs to be unmounted on the node where the GI home is being patched.

The new OPatch utility should be updated in all of the Oracle RAC database homes and the GI home that are being patched.

For each Oracle RAC database home and the GI home that are being patched, as the home owner, extract the OPatch utility.

For exact instructions to install OPatch, follow the OPatch readme.

For information about OPatch documentation, including any known issues, see My Oracle Support Document 293369.1 OPatch documentation list.

3 Installation

These instructions are for all Oracle Database installations.

3.1 Patch Pre-Installation Instructions

Before you install Database Release Update 19.19.0.0.230418, perform the following actions to check the environment and to detect and resolve any interim patch conflicts.

3.1.1 Applying Database 19.x Updates/Revisions with Oracle JavaVM 19.x Updates

The Oracle JavaVM 19.x Release Update is available as a separate patch. That separate patch has some additional requirements if it is to be installed in a RAC Rolling fashion, as detailed in MOS NOTE 2217053.1. For customers who want to install both patches together during a single downtime window, follow one of the Patching Options listed in the My Oracle Support Document 1929745.1 - Oracle JavaVM Component Database PSU and RU" (OJVM PSU and OVJM RU) Patches.

3.1.2 Environments with Grid Infrastructure

This patch is not to be installed to an environment that has a Grid Infrastructure home. Please refer to the following My Oracle Support Document 888.1 to determine the appropriate Grid infrastructure patch to be installed.

3.1.3 Environment Checks

  1. Ensure that the $PATH definition has the following executables: makearld, and nm.

    The location of these executables depends on your operating system. On many operating systems, they are located in /usr/ccs/bin, in which case you can set your PATH definition as follows:

    <span style="color:#000000">export PATH=$PATH:/usr/ccs/bin
    </span>

3.1.4 Interim Patch Conflict Detection and Resolution

The fastest and easiest way to determine whether you have interim patches in the Oracle home that conflict with Database Release Update 19.19.0.0.230418, and to get the necessary conflict resolution patches, is to use the Patch Recommendations and Patch Plans features on the Patches & Updates tab in My Oracle Support. These features work in conjunction with the My Oracle Support Configuration Manager. Recorded training sessions on these features can be found in Document 603505.1.

However, if you are not using My Oracle Support Patch Plans, the My Oracle Support Conflict Checker tool enables you to upload an OPatch inventory and check the patches that you want to apply to your environment for conflicts.

If no conflicts are found, you can download the patches. If conflicts are found, the tool finds an existing resolution to download. If no resolution is found, it will automatically request a resolution, which you can monitor in the Plans and Patch Requests region of the Patches & Updates tab.

For more information, see Knowledge Document 1091294.1How to use the My Oracle Support Conflict Checker Tool.

Or, use the following steps to manually discover conflicts and resolutions:

  1. Determine whether any currently installed interim patches conflict with the patch being installed, 35042068:

    <span style="color:#000000">unzip p35042068_<version>_<platform>.zip
    cd 35042068
    opatch prereq CheckConflictAgainstOHWithDetail -ph ./
    </span>
  2. The report indicates the patches that conflict and the patches that are a superset.

  3. Use My Oracle Support Document 1321267.1 Database Patch conflict resolution to determine, for each conflicting patch, whether a conflict resolution patch is already available, and if you need to request a new conflict resolution patch or if the conflict may be ignored.

  4. When all the interim patches that you have requested are available at My Oracle Support, proceed with Section 3.2, "Patch Installation Instructions".

3.2 Patch Installation Instructions

Follow these steps:

  1. If you are using a Data Guard Physical Standby database, you must install this patch on both the primary database and the physical standby database, as described by My Oracle Support Document 278641.1.

  2. If this is a RAC environment, install this patch using the OPatch rolling (no downtime) installation method as this patch is rolling RAC installable. Refer to My Oracle Support Document 244241.1 Rolling Patch - OPatch Support for RAC.

  3. If this is not a RAC environment, shut down all instances and listeners associated with the Oracle home that you are updating. For more information, see Oracle Database Administrator's Guide.

  4. Set your current directory to the directory where the patch is located and then run the OPatch utility by entering the following commands:

    <span style="color:#000000">unzip -d <PATCH_TOP_DIR> p35042068_<version>_<em><platform></em>.zip
    cd <PATCH_TOP_DIR> 35042068
    opatch apply
    </span>
  5. If there are errors, refer to Section 5, "Known Issues".

3.3 Patch Post-Installation Instructions

On Oracle Database server, after installing the patch, perform the following actions. This is not required on Oracle Database client.

  1. Apply conflict resolution patches as explained in Section 3.3.1.

  2. Load modified SQL files into the database, as explained in Section 3.3.2.

  3. Upgrade Oracle Recovery Manager Catalog, as explained in Section 3.3.3.

  4. Bug fixes that may change an existing optimizer execution plan, as explained in Section 3.3.4.

3.3.1 Apply Conflict Resolution Patches

Apply the patch conflict resolution interim patches that were determined to be needed when you performed the steps in Section 3.1.4, "interim Patch Conflict Detection and Resolution".

3.3.2 Load Modified SQL Files into the Database

The following steps load modified SQL files into the database. For a RAC environment, perform these steps on only one node.

Datapatch is run to complete the post-install SQL deployment for the patch being installed. For further details about Datapatch, including Known Issues and workarounds to common problems, see: Datapatch: Database 12c Post Patch SQL Automation (Doc ID 1585822.1).

  1. For each separate database running on the same shared Oracle home being patched, run the datapatch utility as described in Table 2.

    Table 2 Steps to Run the Datapatch Utility for Non-CDB Oracle Database Versus Single/Multitenant (CDB/PDB) Oracle DB

    StepsNon-CDB Oracle DatabaseStepsSingle/Multitenant (CDB/PDB) Oracle Database

    1

    % sqlplus /nolog

    1

    % sqlplus /nolog

    2

    SQL> Connect / as sysdba

    2

    SQL> Connect / as sysdba

    3

    SQL> startup

    3

    SQL> startup

    4

    SQL> quit

    4

    SQL> alter pluggable database all open;Foot 1

    5

    % cd $ORACLE_HOME/OPatch

    5

    SQL> quit

    6

    % ./datapatch -verbose

    6

    % cd $ORACLE_HOME/OPatch

    7

    % ./datapatch -verbose

    Footnote 1 It is recommended the Post Install step be run on all pluggable databases; however, the following command (SQL> alter pluggable database PDB_NAME open ) could be substituted to only open certain PDBs in the single/multitenant database. Doing so will result in the Post Install step only being run on the CDB and opened PDB's. To update a pluggable database at a later date (skipped or newly plugged in), open the database using the alter pluggable database command mentioned previously and rerun the datapatch utility. See My Oracle Support Document 1935365.1 Multitenant Unplug/Plug Best Practices for more information about the procedure for unplugging/plugging with different patch releases (in both directions).

    The datapatch utility runs the necessary apply scripts to load the modified SQL files into the database. An entry is added to the dba_registry_sqlpatch view reflecting the patch application. In the dba_registry_sqlpatch view, verify the Status for the APPLY is "SUCCESS". For any other status, refer to the following My Oracle Support note for additional information and actions: Document 2335899.2 Troubleshooting Assistant: 12c Datapatch Issues.

  2. Check the following log files in $ORACLE_BASE/cfgtoollogs/sqlpatch/35042068/<unique patch ID> for errors:

    <span style="color:#000000">35042068_apply_<database SID>_<CDB name>_<timestamp>.log
    </span>

    where database SID is the database SID, CDB name is the name of the multitenant container database, and timestamp is of the form YYYYMMMDD_HH_MM_SS.

  3. Any (pluggable) database that has invalid objects after the execution of datapatch should have utlrp.sql run to revalidate those objects.
    <span style="color:#000000">For example:
    cd $ORACLE_HOME/rdbms/admin
    $ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl -n 1 -e -b utlrp -d $ORACLE_HOME/rdbms/admin utlrp.sql</span>

3.3.3 Upgrade Oracle Recovery Manager Catalog

If you are using the Oracle Recovery Manager, the catalog needs to be upgraded. Enter the following command to upgrade it. The UPGRADE CATALOG command must be entered twice to confirm the upgrade.

<span style="color:#000000">$ rman catalog username/password@alias
RMAN> UPGRADE CATALOG;
RMAN> UPGRADE CATALOG;
RMAN> EXIT;
</span>

3.3.4 Bug Fixes That May Change an Existing Optimizer Execution Plan

At the successful conclusion of the patching event, none of the database bug fixes that may change an existing optimizer execution plan are delivered with the bug fix disabled by default. The status of any module bug fixes (which cause an execution plan change) that were in an enabled state prior to starting the patching event are preserved, but no new module bug fixes (which cause an execution plan change) are activated automatically.

Details on this, including the commands to explicitly enable such bug fixes are present in My Oracle Support Document 2147007.1.

3.4 Patch Post-Installation Instructions for Databases Created or Upgraded after Installation of this patch in the Oracle Home

On Oracle Database server, you must execute the steps in Section 3.3.2, "Loading Modified SQL Files into the Database" for any new database. There are no actions required for databases that have been upgraded. This is not required on Oracle Database client.

4 Deinstallation

These instructions apply if you need to deinstall the patch.

4.1 Patch Deinstallation Instructions for a Non-RAC Environment

Follow these steps:

  1. Shut down all instances and listeners associated with the Oracle home that you are updating. For more information, see Oracle Database Administrator's Guide.

  2. Run the OPatch utility specifying the rollback argument as follows.

    <span style="color:#000000">opatch rollback -id 35042068
    </span>
  3. If there are errors, refer to Section 5, "Known Issues".

4.2 Patch Post-Deinstallation Instructions for a Non-RAC Environment

On Oracle Database server, after deinstalling the patch, perform the following actions. This is not required on Oracle Database client.

  1. Rollback SQL changes from the the Database, as explained in Section 4.2.1.

  2. Upgrade Oracle Recovery Manager Catalog, as explained in Section 4.2.2.

4.2.1 Load Modified SQL Files into the Database

Datapatch is run to complete the post-deinstall SQL deployment for the patch being deinstalled. For further details about Datapatch, including Known Issues and workarounds to common problems, see: Datapatch: Database 12c Post Patch SQL Automation (Doc ID 1585822.1).

Follow these steps:

  1. For each separate database running on the same shared Oracle home being patched, run the datapatch utility as described in Table 3. If this is Oracle RAC, run datapatch on only one instance.

    Table 3 Steps to Run the datapatch Utility for Non-CDB Oracle Database Versus Single/Multitenant (CDB/PDB) Oracle Database

    StepsNon-CDB Oracle DatabaseStepsSingle/Multitenant (CDB/PDB) Oracle Database

    1

    % sqlplus /nolog

    1

    % sqlplus /nolog

    2

    SQL> Connect / as sysdba

    2

    SQL> Connect / as sysdba

    3

    SQL> startup

    3

    SQL> startup

    4

    SQL> quit

    4

    SQL> alter pluggable database all open;Foot 1

    5

    % cd $ORACLE_HOME/OPatch

    5

    SQL> quit

    6

    % ./datapatch -verbose

    6

    % cd $ORACLE_HOME/OPatch

    7

    % ./datapatch -verbose

    Footnote 1 It is recommended the Post Install step be run on all pluggable databases; however, the following command (SQL> alter pluggable database PDB_NAME open ) could be substituted to only open certain PDBs in the single/multitenant database. Doing so will result in the Post Install step only being run on the CDB and opened PDB's. To update a pluggable database at a later date (skipped or newly plugged in), open the database using the alter pluggable database command mentioned previously and rerun the datapatch utility. See My Oracle Support Document 1935365.1 Multitenant Unplug/Plug Best Practices for more information about the procedure for unplugging/plugging with different patch releases (in both directions).

    The datapatch utility runs the necessary rollback scripts. An entry is added to the dba_registry_sqlpatch view reflecting the patch application. In the dba_registry_sqlpatch view, verify the Status for the ROLLBACK is "SUCCESS". For any other status, refer to the following My Oracle Support note for additional information and actions: Document 2335899.2 Troubleshooting Assistant: 12c Datapatch Issues.

  2. Check the following log files in $ORACLE_BASE/cfgtoollogs/sqlpatch/35042068/<unique patch ID> for errors:

    <span style="color:#000000">35042068_rollback_<database SID>_<CDB name>_<timestamp>.log
    </span>

    where database SID is the database SID, CDB name is the name of the multitenant container database, and timestamp is of the form YYYYMMMDD_HH_MM_SS.

  3. Any (pluggable) database that has invalid objects after the execution of datapatch should have utlrp.sql run to revalidate those objects.
    <span style="color:#000000">For example:
    cd $ORACLE_HOME/rdbms/admin
    $ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl -n 1 -e -b utlrp -d $ORACLE_HOME/rdbms/admin utlrp.sql</span>

4.2.2 Upgrade Oracle Recovery Manager Catalog

If you are using the Oracle Recovery Manager, the catalog needs to be upgraded. Enter the following command to upgrade it. The UPGRADE CATALOG command must be entered twice to confirm the upgrade.

<span style="color:#000000">$ rman catalog username/password@alias
RMAN> UPGRADE CATALOG;
RMAN> UPGRADE CATALOG;
RMAN> EXIT;
</span>

4.3 Patch Deinstallation Instructions for Oracle RAC Environment

Patch deinstallation instructions for Oracle RAC includes these environments:

Follow these steps for each node in the cluster, one node at a time.

  1. Shut down the instance on the node.

  2. Run the OPatch utility specifying the rollback argument as follows.

    <span style="color:#000000">opatch rollback -id 35042068
    </span>

    If there are errors, refer to Section 5, "Known Issues".

  3. Start the instance on the node as follows:

    <span style="color:#000000">srvctl start instance
    </span>

4.4 Patch Post-Deinstallation Instructions for Oracle RAC Environment

On Oracle Database server, follow the instructions listed in Section Section 4.2, "Patch Post-Deinstallation Instructions for a Non-RAC Environment" only on the node for which the steps in Section 3.3.2, "Loading Modified SQL Files into the Database" were executed during the patch application. This is not required on Oracle Database client.

All other instances can be started and accessed as usual while you are executing the deinstallation steps.

5 Known Issues

For information about OPatch issues, see My Oracle Support Document 293369.1 OPatch documentation list.

For issues documented after the release of this patch, see My Oracle Support Document 19202304.9 Oracle DB/GI/OJVM Update/Revision R19 Apr 2023 Known Issues

Other issues are as follows.

Issue 1   

The following ignorable errors may be encountered while running the datapatch/catbundle.sql script or its rollback script:

<span style="color:#000000">ORA-00942: table or view does not exist
ORA-00955: name is already used by an existing object
ORA-01430: column being added already exists in table
ORA-01432: public synonym to be dropped does not exist
ORA-01434: private synonym to be dropped does not exist
ORA-01435: user does not exist
ORA-01917: user or role 'XDB' does not exist
ORA-01920: user name '<user-name>' conflicts with another user or role name
ORA-01921: role name '<role name>' conflicts with another user or role name
ORA-01927: cannot REVOKE privileges you did not grant
ORA-01952: system privileges not granted to 'WKSYS'
ORA-02289: sequence does not exist 
ORA-02303: cannot drop or replace a type with type or table dependents
ORA-02443: Cannot drop constraint - nonexistent constraint
ORA-04043: object <object-name> does not exist
ORA-06512: at line <line number>. If this error follow any of above errors, then can be safely ignored.
ORA-14452: attempt to create, alter or drop an index on temporary table already in use
ORA-29809: cannot drop an operator with dependent objects
ORA-29830: operator does not exist
ORA-29832: cannot drop or replace an indextype with dependent indexes
ORA-29844: duplicate operator name specified 
ORA-29931: specified association does not exist
</span>

6 References

The following documents are references for this patch.

Document 35042068.8 Database Release Update 19.19.0.0.230418

Document 2690728.2 Best Practices for Oracle Database Upgrade to 19c (Doc ID 2690728.2) - The 19c Upgrade Bible with Best Practices, Recommendations, and Links

Document 888.1 Primary Note for Database Proactive Patch Program

Document 1585822.1 Datapatch: Database 12c or later Post Patch SQL Automation

Document 293369.1 Primary Note for OPatch

Document 360870.1 Impact of Java SE Security Vulnerabilities on Oracle Database and Fusion Midleware Products

Document 1321267.1 Database Patch Conflict Resolution

Document 2523220.1 Database 19 Release Updates and Revisions Bugs Fixed Lists

Document 1561792.2 Troubleshooting Assistant: Patching Oracle Database/Client

7 Bugs Fixed by This Patch

See My Oracle Support Document 2523220.1 for the list of bugs fixed in this patch.

8 Documentation Accessibility

For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id-docacc.

Access to Oracle Support

Oracle customers that have purchased support have access to electronic support through My Oracle Support. For information, visit My Oracle Support or visit Learning and Support if you are hearing impaired.


Patch 35042068 - Database Release Update 19.19.0.0.230418

Copyright © 2023, Oracle and/or its affiliates. All rights reserved.

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable:

U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

This software or hardware and documentation may provide access to or information about content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth in an applicable agreement between you and Oracle.


Copyright © 2023, Oracle and/or its affiliates. All rights reserved.
原文链接:https://www.oracle.com/

java多线程——thread方法之currentthread(),isalive(),sleep(),getid(),interrupt(),yiel()方法解析_laoxingyao的博客-爱代码爱编程

1. currentThread()方法:返回调用当前代码段的线程,即返回当前线程。——static   2. isAlive()方法:判断当前的线程是否处于活动状态。     活动状态就是线程已经启动且尚未终止,线程处于正在运行或准备开始运行的状态。   3. Thread.currentThread()与this的区别:前者是指当前线程,后者

多线程学习(三):isalive()和sleep()和getid()-爱代码爱编程

isAlive() isAlive()判断线程是否处于活动状态,即线程已经启动但尚未终止。 例一 public class MyThread extends Thread{ @Override public voi

isAlive()方法的作用-爱代码爱编程

isAlive() 方法的作用是判断当前的线程是否处于活动状态。 什么是活动状态呢?活动状态就是线程已经启动且尚未终止。线程处于正在运行或准备开始运行的状态,就认为线程是“存活”的。 例 1 下面通过一个案例来理解 isAlive() 方法判断线程是否活动的标准。假设 MyThread 线程类的代码如下: public class MyThread

java多线程基础五——isAlive()方法解释-爱代码爱编程

方法简单解释 该方法的功能就是判断当前的线程是否处于活动状态,那么什么是活动状态呢,活动状态就是线程已经启动且尚未终止,当线程正在运行或着准备开始运行的时候,就认为线程是“存活”的,并且以true和false的形式返回,下面举个小栗子: package MyThread; public class mythread extends Thread{