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. multithreading class [modified]

multithreading class [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
help
5 Posts 3 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.
  • E Offline
    E Offline
    es1968
    wrote on last edited by
    #1

    Hi, I need help to write a multi thread simple class, I know this should be simple but I face some difficulties, any help will be appreciated. Implementing single-write, multiple-read multi thread synchronization (using windows synchronization primitives like mutex, semaphore etc.). Thanks in advance, Eyal

    modified on Saturday, October 17, 2009 7:11 AM

    M C 2 Replies Last reply
    0
    • E es1968

      Hi, I need help to write a multi thread simple class, I know this should be simple but I face some difficulties, any help will be appreciated. Implementing single-write, multiple-read multi thread synchronization (using windows synchronization primitives like mutex, semaphore etc.). Thanks in advance, Eyal

      modified on Saturday, October 17, 2009 7:11 AM

      M Offline
      M Offline
      Moak
      wrote on last edited by
      #2

      Hi Eyal! In what problem did you run, what have you done so far, which multithreading tutorials have you read? Have a good weekend /M

      Webchat in Europe :java: (only 4K)

      E 1 Reply Last reply
      0
      • M Moak

        Hi Eyal! In what problem did you run, what have you done so far, which multithreading tutorials have you read? Have a good weekend /M

        Webchat in Europe :java: (only 4K)

        E Offline
        E Offline
        es1968
        wrote on last edited by
        #3

        Hi Moak, Just faced with this question in a C++ questioner/quiz. I read information/tutorials on multithreading mutex but I haven't deal yet with the answer. looking for the right answer. Best, Eyal

        1 Reply Last reply
        0
        • E es1968

          Hi, I need help to write a multi thread simple class, I know this should be simple but I face some difficulties, any help will be appreciated. Implementing single-write, multiple-read multi thread synchronization (using windows synchronization primitives like mutex, semaphore etc.). Thanks in advance, Eyal

          modified on Saturday, October 17, 2009 7:11 AM

          C Offline
          C Offline
          cmk
          wrote on last edited by
          #4

          There are many ways to do this, depending on if you want to enforce a preference for readers or writers or neither. The easy way would be to assume the target system is Vista or greater and use the new SRWLOCK[^] variable. :) However, I expect the spirit of the question was to write the logic yourself. Check the following links: http://blogs.msdn.com/vancem/archive/2006/03/28/563180.aspx[^] http://blogs.msdn.com/vancem/attachment/563180.ashx[^] http://www.bluebytesoftware.com/blog/2009/01/30/ASinglewordReaderwriterSpinLock.aspx[^] If you have a question about a specific implimentation then post the code you having troubles with.

          ...cmk The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying. - John Carmack

          E 1 Reply Last reply
          0
          • C cmk

            There are many ways to do this, depending on if you want to enforce a preference for readers or writers or neither. The easy way would be to assume the target system is Vista or greater and use the new SRWLOCK[^] variable. :) However, I expect the spirit of the question was to write the logic yourself. Check the following links: http://blogs.msdn.com/vancem/archive/2006/03/28/563180.aspx[^] http://blogs.msdn.com/vancem/attachment/563180.ashx[^] http://www.bluebytesoftware.com/blog/2009/01/30/ASinglewordReaderwriterSpinLock.aspx[^] If you have a question about a specific implimentation then post the code you having troubles with.

            ...cmk The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying. - John Carmack

            E Offline
            E Offline
            es1968
            wrote on last edited by
            #5

            cmk, Thank you very much, Eyal

            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