zhouhu 最近的时间轴更新
zhouhu

zhouhu

V2EX 第 380762 号会员,加入于 2019-01-29 10:46:06 +08:00
Java 21 分代 ZGC 讨论学习
  •  1   
    程序员  •  zhouhu  •  4 天前
    mac idea 快捷键冲突问题求助
    程序员  •  zhouhu  •  303 天前  •  最后回复来自 zhouhu
    6
    公考/事业单位考试/行测
    问与答  •  zhouhu  •  2021-04-08 13:31:19 PM  •  最后回复来自 aydd2004
    28
    福报 996 的屠刀落在了我的脖子上,同志们谨慎选择公司。
  •  2   
    职场话题  •  zhouhu  •  2021-01-20 19:15:31 PM  •  最后回复来自 adgad2
    20
    大家都是入职多少天跑路的?
    调查  •  zhouhu  •  2020-11-13 15:49:39 PM
    面试阿里, Java 五面五挂
    职场话题  •  zhouhu  •  2020-01-02 15:36:56 PM  •  最后回复来自 litefy
    37
    zhouhu 最近回复了
    4 天前
    回复了 forschers 创建的主题 Java JDK21 9 月 19 日 来咯!
    @arloor
    some blocking operations in the JDK do not unmount the virtual thread, and thus block both its carrier and the underlying OS thread.

    If a virtual thread performs a blocking operation such as I/O or BlockingQueue.take() while it is pinned, then its carrier and the underlying OS thread are blocked for the duration of the operation. Frequent pinning for long durations can harm the scalability of an application by capturing carriers.
    4 天前
    回复了 cbdyzj 创建的主题 Java Java 21 今日 GA,有虚拟线程(协程)
    ![测试图片]( https://imgur.com/a/nxo9wQv)
    4 天前
    回复了 cbdyzj 创建的主题 Java Java 21 今日 GA,有虚拟线程(协程)
    补充一个,堆大小为 128M:
    Time: 
    2023-09-20 11:13:18
    Used: 108,544 kbytes
    Committed: 131,072 kbytes
    Max: 131,072 kbytes
    GC time: 
     8.149 seconds on ZGC Minor Cycles (384 collections)

     0.006 seconds on ZGC Minor Pauses (1,185 collections)

    12.133 seconds on ZGC Major Cycles (61 collections)

     0.001 seconds on ZGC Major Pauses (279 collections)
    4 天前
    回复了 forschers 创建的主题 Java JDK21 9 月 19 日 来咯!
    @voidmnwzp
    你说的是这个吧
    There are two scenarios in which a virtual thread cannot be unmounted during blocking operations because it is pinned to its carrier:

    When it executes code inside a synchronized block or method, or
    When it executes a native method or a foreign function.

    官方解释:
    The scheduler does not compensate for pinning by expanding its parallelism. Instead, avoid frequent and long-lived pinning by revising synchronized blocks or methods that run frequently and guard potentially long I/O operations to use java.util.concurrent.locks.ReentrantLock instead. There is no need to replace synchronized blocks and methods that are used infrequently (e.g., only performed at startup) or that guard in-memory operations. As always, strive to keep locking policies simple and clear.

    后续优化:
    In a future release we may be able to remove the first limitation above, namely pinning inside synchronized. The second limitation is required for proper interaction with native code.
    5 天前
    回复了 forschers 创建的主题 Java JDK21 9 月 19 日 来咯!
    @Goooooos
    JEP 446 Scoped Values (Preview)
    Introduce scoped values, values that may be safely and efficiently shared to methods without using method parameters. They are preferred to thread-local variables, especially when using large numbers of virtual threads. This is a preview API.
    5 天前
    回复了 forschers 创建的主题 Java JDK21 9 月 19 日 来咯!
    @Mirage09 升级到 11 了,据说后面再升级就容易了。
    这次新版本的新特性还是很值得期待的。虚拟线程和分代 ZGC
    5 天前
    回复了 cbdyzj 创建的主题 Java Java 21 今日 GA,有虚拟线程(协程)
    分代 ZGC 没人关注吗
    5 天前
    回复了 forschers 创建的主题 Java JDK21 9 月 19 日 来咯!
    @Goooooos https://openjdk.org/jeps/444

    irtual threads support thread-local variables (ThreadLocal) and inheritable thread-local variables (InheritableThreadLocal), just like platform threads, so they can run existing code that uses thread locals.

    没看到说有优化
    5 天前
    回复了 forschers 创建的主题 Java JDK21 9 月 19 日 来咯!
    我看到油管的信息,分代 ZGC 吞吐量是 ZGC 的四倍,堆大小是 ZGC 的五分之一,很期待。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1231 人在线   最高记录 5930   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 19ms · UTC 17:39 · PVG 01:39 · LAX 10:39 · JFK 13:39
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.