Programmers can answer all existential questions with ease

  • raubarno
    link
    fedilink
    79 months ago

    It's more efficient for memory until you start working with different data. Threads also rely on the same syscall on Linux, clone(2), but they don't share the entire context by default, so they're more lightweight. It is recommended to use pthreads(3) API instead of fork(2).

    • @dan@upvote.au
      link
      fedilink
      3
      edit-2
      9 months ago

      Also, if you care about Windows, threads are far lighter than processes on that platform. Starting a new process is relatively slow compared to other platforms.