to post messages and comments.

@Strephil:

LO в очередной раз dumped core. В логе много про pthread.
Хм, я думал, LO на крестах написан.
Тогда понятно, почему всё время валится, слыханное ли дело, pthread.

@OCTAGRAM:

cs.wustl.edu

Both Win32 events and POSIX condition variables provide similar waiting, signaling, and broadcasting features. For instance, WaitForMultipleObjects can acquire a mutex and wait on an event simultaneously via the waitAll flag and SignalObjectAndWait can release a mutex and wait on an event atomically. These functions provide semantics akin to the pthread_cond_wait and pthread_cond_signal. Thus, there are instances where either events and condition variables can be used interchangably.
However, extreme care must be taken with Win32 events to ensure that there are no race conditions introduced when switching from one mechanism to another. Unfortunately, there's no way to release just one waiting thread with a manual-reset event. Likewise, there's no way to release all waiting threads with an auto-reset event. This limitation is a major source of difficulty when implementing condition variables, as shown in Section 3.
After years of repeatedly seeing Win32 implementations of condition variables posted in newsgroups like comp.programming.threads it became apparent that many Win32 implementations are either incorrect or contain subtle problems that can lead to starvation, unfairness, or race conditions. To help developers avoid these problems, this article evaluates common strategies for implementing POSIX condition variables on Win32, illustrating common traps and pitfalls and ways to avoid them.

@L29Ah:

Как удалённо усыпить/пробудить тред? Linux-специфичные хаки, не предусмотренные pthread'ами, тоже устраивают.

@grouzen:

Жуйк, подскажи. Есть у меня несколько тредов, которые должны принимать-отсылать данные через один udp сокет. Дескриптор сокета создается в main(дескриптор сокета обьявлен глобально), затем стартуются треды. Столкнулся я с тем, что recvfrom возвращает bad file descriptor.