Java 24 Stops Pinning Virtual Threads (Almost) - Inside Java Newscast #80

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 พ.ย. 2024

ความคิดเห็น • 29

  • @Denis-ez8gd
    @Denis-ez8gd 4 วันที่ผ่านมา +10

    Is there any thread or article that explains why using io_uring for Java in this case has problems?

    • @nipafx
      @nipafx 4 วันที่ผ่านมา +3

      Alan Bateman spoke on that topic at the most recent Ask the Architects session: th-cam.com/video/SPc9YpLsYo8/w-d-xo.html
      Good question, by the way, I added the link to the description.

  • @federicojeanne
    @federicojeanne วันที่ผ่านมา

    As usual @nipafx, you do a great job explaining complex stuff. I now finally understood how and why pinning occurred when entering a synchronized block and I also learned about 2 things that weren't really in my radar before (even down to the "how" and "why" too!).
    Top gemacht, weiter so!

  • @fabiomaruca142
    @fabiomaruca142 4 วันที่ผ่านมา +5

    I love this podcast🥰

    • @nipafx
      @nipafx 4 วันที่ผ่านมา

      Thank you, Fabio! 💙🧡

  • @slippinchillin
    @slippinchillin 4 วันที่ผ่านมา +4

    Just want to say, software engineering is crazy.
    I have just barely grasp the concept of concurrency and threads and know how to use virtual threads, and people are already talking about flaws in it.

    • @nipafx
      @nipafx 4 วันที่ผ่านมา +3

      Yeah, things are constantly moving and if you watch details, it's very fast, too - like standing on a platform when a high-speed train is barreling through the station. But you don't _need_ to know all details. It's fine to take a step back and just look at the fast moving train from a distance. Don't feel rushed by change. 😃

    • @federicojeanne
      @federicojeanne วันที่ผ่านมา

      That's the beauty of having top engineers like those working in the Valhalla project behind it: by the time we are learning to walk, they are already looking for holes and paving the road.
      I just love that.

  • @ahmedurmiteahmedurmite3711
    @ahmedurmiteahmedurmite3711 4 วันที่ผ่านมา +5

    Great video, thanks for the explanation! Any idea when we can expect Project Valhalla to be officially released? Really excited about the potential performance improvements it could bring to Java!

    • @nipafx
      @nipafx 4 วันที่ผ่านมา

      Valhalla won't be released in one piece. At this point, it seems virtually guaranteed that JEP 401 openjdk.org/jeps/401 will be the first feature to land. As to when, that's speculation that I stopped participating in after getting it wrong for a few years in a row. 😬

    • @federicojeanne
      @federicojeanne วันที่ผ่านมา

      hm, I always thought that Valhalla was really an incubator that would gradually bring enhancements in form of JEPs and therefore would never be "released". I mean everything that Valhalla contributes is brought out without delay, its JEPs are being released and not the project as a whole.
      Or maybe I misunderstood what you meant by "released"?

  • @toinouH
    @toinouH 4 วันที่ผ่านมา

    In the case of io_uring we know that Windows IORing is very similar to it so it would be nice if finally we could make use of it.😊

  • @shakilahmed4647
    @shakilahmed4647 4 วันที่ผ่านมา +2

    Yep you earned that like button click 🎉

    • @nipafx
      @nipafx 4 วันที่ผ่านมา

      😊

  • @duckydude20
    @duckydude20 3 วันที่ผ่านมา

    one thing that i feel is needed is threadlocal alternative for caching rather than using objectpool which is costly. idk if that's even possible.
    i didn't know file io pinning was also happening in virtual threads. i thought thats the whole purpose of virtual threads, to do blocking operations without blocking.

    • @nipafx
      @nipafx 2 วันที่ผ่านมา

      I'm not sure what and how exactly you want to cache, but take a look at scoped values openjdk.org/jeps/487. Maybe they're what you're looking for.
      Yes, the purpose of virtual threads is not to block OS threads when executing blocking operations. But unfortunately that goal isn't currently feasible across the board: native stack frames and file I/O are the exceptions.

  • @vivekravi827
    @vivekravi827 2 วันที่ผ่านมา

    What would be the case on reentrant locking, parent and child sharing locks? How would VT behave?

    • @nipafx
      @nipafx 2 วันที่ผ่านมา

      I briefly mention it at 6:21: Virtual threads properly unmount for all locks (and have done so since their first release). It's really only native code and file I/O that doesn't behave as desired.

  • @mwigojonathanmark1683
    @mwigojonathanmark1683 3 วันที่ผ่านมา

    I know this shouldn't be here but I wanted some help with Java JavaFX GraalVM Native Image creation. I do create the native image but it can't run successfully, furthest I have gotten is the native image claims not to find Main.main() which is my app's entry point.

  • @lukaszmachowski
    @lukaszmachowski 3 วันที่ผ่านมา +1

    J V Aim

  • @Derbnage
    @Derbnage 4 วันที่ผ่านมา +2

    I write Java

    • @simonmassey8850
      @simonmassey8850 4 วันที่ผ่านมา +3

      Which java? 1.1 stuff with AWT? That's newbie stuff. The Goat version is 1.5, which was the last thing complex anyone had to figure out. Master that, and you are an expert! Clearly, everyone pretends they program 1.8 with that lambda stuff. Especially in job interviews! Speaking of which, why are we watching this crazy video!? Wild stuff! 😂

    • @AmirSina.R
      @AmirSina.R 4 วันที่ผ่านมา

      Java ☕

  • @thanosfisherman
    @thanosfisherman 4 วันที่ผ่านมา +2

    Just give us Valhalla already wtf is wrong with you!

    • @nipafx
      @nipafx 4 วันที่ผ่านมา +5

      If one woman can make one baby in nine months, how many months does it take nine women to make one baby?

    • @thanosfisherman
      @thanosfisherman 4 วันที่ผ่านมา

      @nipafx You talk in riddles young man

    • @nipafx
      @nipafx 4 วันที่ผ่านมา

      @@thanosfisherman Some processes take as long as they take and can't be rushed by adding more resources. So it's not like we'd get value types faster if only we didn't work on improving virtual threads. And if your implicit question wasn't "why are you working on virtual threads instead of value types?", then I don't see why you would post your Valhalla demands under an unrelated video.

    • @thanosfisherman
      @thanosfisherman 4 วันที่ผ่านมา

      @@nipafx You are right I don't know how you guys allocate resources on features. My assumption was that you prioritize other tasks instead of the highly anticipated Valhala! Anyhow virtual threads are important of course but you know you've been spoiling us with Valhala features for a while now in this channel.

    • @nipafx
      @nipafx 3 วันที่ผ่านมา +1

      @@thanosfisherman Trust me, I'm just as impatient to get my hands on value types as you are (that's probably why I teased you with such content; I need to share my excitement!). And the Valhalla folks are working on it full steam, but it just takes time.