pthreads :: PthreadCond :: defaultinit
pthreads :: PthreadCond :: wait
Make the current thread waiting for a signal (mutex
should be locked)
pthreads $ PthreadCond :: SELF
Type of this instance, automatically specialized in every classcore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Object :: defaultinit
core :: FinalizableOnce :: defaultinit
core :: Finalizable :: defaultinit
pthreads :: PthreadCond :: defaultinit
core :: Finalizable :: finalize
Liberate any resources held byself
before the memory holding self
is freed
core :: FinalizableOnce :: finalize_once
Real finalization method ofFinalizableOnce
, will be called only once
core :: FinalizableOnce :: finalized
Hasself
been finalized? (either by the GC or an explicit call to finalize
)
core :: FinalizableOnce :: finalized=
Hasself
been finalized? (either by the GC or an explicit call to finalize
)
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: output_class_name
Display class name on stdout (debug only).pthreads :: PthreadCond :: wait
Make the current thread waiting for a signal (mutex
should be locked)
# Condition variable
class PthreadCond
super FinalizableOnce
private var native = new NativePthreadCond
# Destroy `self`
redef fun finalize_once do native.destroy
# Signal at least one thread waiting to wake up
fun signal: Int do return native.signal
# Signal all the waiting threads to wake up
fun broadcast do native.broadcast
# Make the current thread waiting for a signal ( `mutex` should be locked)
fun wait(mutex: Mutex) do native.wait(mutex.native.as(not null))
end
lib/pthreads/pthreads.nit:426,1--443,3