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
  1. Home
  2. General Programming
  3. C#
  4. What is the correspondence .Net Class?

What is the correspondence .Net Class?

Scheduled Pinned Locked Moved C#
questioncsharp
2 Posts 2 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
    EastDragon
    wrote on last edited by
    #1

    I want to program a app that use Producer-Consumer Multithread model, I used to use WinAPI WaitForSingleObject & ReleaseSemaphore as a PV operator. Which .Net class can I use to implement to same ? Thank you! Let's roll!

    H 1 Reply Last reply
    0
    • E EastDragon

      I want to program a app that use Producer-Consumer Multithread model, I used to use WinAPI WaitForSingleObject & ReleaseSemaphore as a PV operator. Which .Net class can I use to implement to same ? Thank you! Let's roll!

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      See the class documentation for the System.Threading namespace in the .NET Framework SDK. There's lots of information in there. WaitHandle and its derivates have several wait methods that wait for the WaitHandle to be signaled. There's also classes for mutexes and monitors. If you use the lock keyword in C# against an instance of an object (a static object for synchronizing static resources, and an instance - if you prefer - for instance resources). There's a good section on programming in .NET with threads. See Threading[^] in the .NET Framework SDK on MSDN Online for more information, which should be the first place you check (such as scanning what's available in the class library reference).

      Microsoft MVP, Visual C# My Articles

      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