• Warl0k3
    link
    fedilink
    arrow-up
    103
    ·
    6 days ago

    hang on, that first image is everything on a single thread…

      • Warl0k3
        link
        fedilink
        arrow-up
        27
        ·
        edit-2
        6 days ago

        Making the word bigger doesn’t mean there’s more threads per, it just reduces the number of calls to complete some kinds of ops (and something about RAMing busses into each other and… cache locations? idk I’m sleepy)

        • ZILtoid1991OP
          link
          fedilink
          arrow-up
          8
          ·
          6 days ago

          The double deckers are an example of a ready-made solution in the original language’s standard library, the lower one is getting multithreading working through the C ABI bindings, using some 3rd party solution, all while multithreading a lot of other tasks in the application.

          • ozymandias@lemmy.dbzer0.com
            link
            fedilink
            arrow-up
            4
            arrow-down
            1
            ·
            5 days ago

            nah, then each bus’s beginning and end would be restarting the whole program… the first picture should be a five lane freeway at rush hour

      • Ajen@sh.itjust.works
        link
        fedilink
        arrow-up
        4
        ·
        5 days ago

        Both decks of the bus follow the same [code] path. That’s a lot more like increasing the buffer size.

  • schema
    link
    fedilink
    arrow-up
    44
    ·
    6 days ago

    You just know the bottom picture will be used in slides by professors for the next 30 years

    • ZILtoid1991OP
      link
      fedilink
      arrow-up
      7
      arrow-down
      4
      ·
      edit-2
      5 days ago

      At least it won’t be like that infamous Hungarian teacher

      cw: awful human being making awful analogies

      There was some engineering professor in Hungary, who was convinced rape did not exist and women just made up to control men, and used a shot glass to prove it, by asking his students to try to put their fingers into it while moving it around quickly. Allegedly, just before he got fired, someone took a toy gun in for that analogy, then his head got red and stopped his analogy.

        • KairuByte@lemmy.dbzer0.com
          link
          fedilink
          arrow-up
          11
          ·
          edit-2
          5 days ago
          Tap for spoiler

          I’m guessing the prof would say “if you cant put your finger in, rape isn’t real” then like, put the glass in his pocket or fend them off.

          Bring in a toy gun and say “let me put my finger in or I’ll shoot you” to prove that rape is real.

  • ns1@feddit.uk
    link
    fedilink
    English
    arrow-up
    28
    ·
    6 days ago

    At the risk of explaining what everyone here already gets: I like how the bottom picture could literally be a diagram of a 4-way deadlock where the buses are threads of execution and the roundabout exits are object locks.

    Whereas in top picture there are no passengers and I’m fairly sure the buses aren’t moving. Which probably says something about the state of the documentation

  • tetris11@feddit.uk
    link
    fedilink
    English
    arrow-up
    8
    ·
    6 days ago

    That’s because they’re using Little Endian in the first picture, and Big Endian in the second picture.

    No wonder they’ve got unpatched race conditions if they used the wrong flag at compile time

  • panda_abyss@lemmy.ca
    link
    fedilink
    arrow-up
    7
    ·
    6 days ago

    All I wanted was to call ‘read’ while I listen on a socket!

    Where did it all go so wrong!?