Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Is pipe an effiecient way for communication between threads?

Is pipe an effiecient way for communication between threads?

Scheduled Pinned Locked Moved C / C++ / MFC
question
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    Wenrich
    wrote on last edited by
    #1

    is it fast, reliable? What are the cases it is must suitable for and what are the cases it shouldn't be used? Thanks a lot! Wenrich

    C J V 3 Replies Last reply
    0
    • W Wenrich

      is it fast, reliable? What are the cases it is must suitable for and what are the cases it shouldn't be used? Thanks a lot! Wenrich

      C Offline
      C Offline
      Carlos Antollini
      wrote on last edited by
      #2

      I am using pipes for comunicate threads in a security system And I never had problems with that... Best Regards... Carlos Antollini. Pi Five[^]Creator Sonork ID 100.10529 cantollini

      1 Reply Last reply
      0
      • W Wenrich

        is it fast, reliable? What are the cases it is must suitable for and what are the cases it shouldn't be used? Thanks a lot! Wenrich

        J Offline
        J Offline
        Joe Woodbury
        wrote on last edited by
        #3

        It's a terrible, and extremely inefficient, way to communicate between threads. A semaphore based queue will be the most efficient general solution. If complex synchronization isn't needed, or we're talking just mainting state information, using CriticalSections or the Interlocked... calls is sufficient.

        1 Reply Last reply
        0
        • W Wenrich

          is it fast, reliable? What are the cases it is must suitable for and what are the cases it shouldn't be used? Thanks a lot! Wenrich

          V Offline
          V Offline
          valikac
          wrote on last edited by
          #4

          Name pipe is a good solution for communication between multiple processes. For communication between threadings I recommend CRITICAL_SECTION, mutex, event, and sephamore. Kuphryn

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups