绿色和本地线程简单介绍

本文介绍了Java的绿线程和本地线程,绿线程在用户级实现,使用单个OS线程,而本地线程利用操作系统的线程系统。在多处理器环境下,本地线程能提升性能,但非线程安全的平台相关代码可能无法正确运行。默认情况下,Solaris JDK使用绿线程,可通过- green或-native标志切换。在某些场景下,如使用oci驱动进行SSL处理时,需使用本地线程。
摘要由CSDN通过智能技术生成

绿色和本地线程简单介绍
author: mdwolf 2005-08-02
================================================================================
Java
There are two versions of the Java Development Kit (JDK) installed.
The first is the standard Java 1.1.x version, and the other is the new Java 2 (1.2.x) version.

There are two threading types available with each of the JDK's: green and native.
Green threads implement user level threads, and use only a single OS thread.

Native threads use the OS's threading system, and use one OS thread per java thread.
The threading modes can be selected by using the -green or -native flags when execu

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值