Assertion: class semaphore | /r/HasProperty | private: int value
Facets:
Source sentences:
text: class Semaphore { private: int value; pthread_mutex_t m; pthread_cond_t c; public: /* -- CONSTRUCTOR
text: / package com.randomwalk.library.sync; public class Semaphore { private int counter; public Semaphore()
text: public class Semaphore { private boolean signal = false; public synchronized void take() { this.signal = true; this.notify(); } public synchronized void release() throws InterruptedException{ while(!this.signal) wait(); this.signal = false; } }