即将推出的 Java 并发库:jsr166y 是什么? jsr166z?

发布于 2024-07-17 07:42:56 字数 952 浏览 5 评论 0原文

我想尝试一下即将推出的并发库 将被包含在
Java 7 根据此网站

它似乎被命名为JSR166

在大多数地方,其参考实现被称为jsr166y, 而很少有资源称之为jsr166z

我发现每个参考实现都有两个完全不同的javadoc。

现在,哪个实现将包含在 Java 7 中?

编辑
虽然回答的人建议 jsr166y 是 Java 7 的东西, 我发现这个<来自 JavaOne 的 /strong> 文档 (TS-5515)。 本文档引用了 Java 7,但提到了 LinkedAsyncAction 仅存在于 jsr166z javadocs 中。 (困惑...)

I wanted to play around with the upcoming concurrency library which
is going to be included in
Java 7 according to this website.

It seems to be named JSR166.

In most places its reference implementation is referred as jsr166y,
while few resources call it jsr166z.

I discovered two totally different javadocs for each reference implementation.

Now, which implementation is going to be included in Java 7?

EDIT
While people who answered suggest that jsr166y is the thing for Java 7,
I discovered this document (TS-5515) from JavaOne.
This document refers to Java 7 but mentions LinkedAsyncAction
which is only present in jsr166z javadocs. (Confusion...)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

蘑菇王子 2024-07-24 07:42:56

JSR 166 是 Java 5 的原始 Java 并发 jsr,它创建了 java.util.concurrent。 他们在 Java 6 中进行了名为 JSR 166x 的维护修订。 Java 7 维护版本为 JSR 166y。 JSR 166z 是闭包原型版本。

目前计划包含在 JSR 166y 中的是:

  • Fork/join(但不是 ParallelArray 框架)
  • TransferQueue / LinkedTransferQueue 集合
  • Phasers(类固醇上的 CyclicBarriers)

推送到 JDK 8(至少):

  • Fences API(低级别),试图删除使用不安全调用
  • ConcurrentReferenceHashMap(可变强/弱引用、并发等)

有关更多信息,javadoc 此处 或加入并发兴趣邮件列表:

JSR 166 was the original Java concurrency jsr for Java 5 that created java.util.concurrent. They did a maintenance rev in Java 6 called JSR 166x. The Java 7 maintenance rev is JSR 166y. JSR 166z is the closures prototype version.

Currently slated to be included in JSR 166y is:

  • Fork/join (but NOT the ParallelArray framework)
  • TransferQueue / LinkedTransferQueue collection
  • Phasers (CyclicBarriers on steroids)

Push to JDK 8 (at least):

  • Fences API (low level), trying to remove use of Unsafe calls
  • ConcurrentReferenceHashMap (variable strong/weak refs, concurrent, etc)

For more info, javadoc here or join the concurrency-interest mailing list:

萌酱 2024-07-24 07:42:56

javac.info 站点 (jsr166z) 上的链接使用 BGGA 闭包,这在 JDK7 中不存在。

Doug Lea 网站 (jsr166y) 上的链接应该是最新的。 Doug 是规格负责人。 由于 fork-join 框架在实践中如何使用尚不清楚,API 已被精简为基础知识。 据推测,库将在稍高的级别上提供,当事情稳定下来时,可以将更多库添加到 JDK8 中。

The link on the javac.info site (jsr166z) uses BGGA closures which will not be in JDK7.

The link on Doug Lea's site (jsr166y) should be up to date. Doug is the spec lead. The API has been pruned down to the basics as how the fork-join framework will be used in practice is not yet clear. Presumably libraries will be available at a slightly higher level, and when thing settle down more can be added to JDK8.

恋竹姑娘 2024-07-24 07:42:56

查看各种可用的参考(例如,此电子邮件 来自 Doug Lea),很明显,当前用于 JDK7 并发添加的 JSR 是 jsr166y。 此外,如果您访问网页 Closures for the Java Programming Language (aka BGGA) 并查看 (当前是什么)第四个项目符号“Doug Lea 的 jsr166y fork-join 框架”,jsr166y 被描述为“无函数类型”的 fork-join 框架,jsr166z 被描述为“具有函数类型”的 fork-join 框架。

看起来 jsr166z 是并发添加和 BGGA 之间的交叉。 也许这提供了 BGGA 所需的并发实用程序?

Looking at various references available (for example, this Email from Doug Lea), it seems clear that the current JSR for JDK7 concurrency additions is jsr166y. Additionally, if you go to the web page Closures for the Java Programming Language (aka BGGA) and look at (what is currently) the 4th bulleted item "Doug Lea's jsr166y fork-join framework", jsr166y is described as the fork-join framework "without function types" and jsr166z is described as the fork-join framework "with function types."

It looks like jsr166z is a cross between concurrency additions and BGGA. Perhaps this provides concurrency utilities required by BGGA?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文