Results 1 to 2 of 2

Thread: Semaphore

  1. #1
    g00fy is offline Registered User
    Name: Salvania
    Organization: Salvania
    Project: Database systems
    Join Date
    Dec 2005
    Posts
    45

    Semaphore

    Hi,


    I would like to see a semaphore built into Ice. The principle is that x threads are allowed to enter a same section, and where one leaves he do a broadcast() that he leaves and another thread can enter the section. It's just ensuring not more then x threads are working on the same (maybe heavily loaded line) thing...


    Greetz
    Steven Van Ingelgem
    Salvania [http://www.salvania.be/]
    Product Descr.: Statistical data analysis

  2. #2
    michi's Avatar
    michi is offline Registered User
    Name: Michi Henning
    Organization: Triodia Technologies
    Project: I have a passing interest in Ice :-)
    Join Date
    Feb 2003
    Location
    Brisbane, Australia
    Posts
    1,055
    Have a look at the threading chapter of the Ice manual. Ice provides a number of synchronization primitives, including IceUtil::Monitor, which does what you want.

    Cheers,

    Michi.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •