Ш̴̴̜̥͍͕̼̙̱͙͎͍̘̀̐̔́̾̃͒̈̔̎́́͜р̧̛̺͖͖̯̖ͧͤ͋̅̽ͧ̈̐̽̆̐͋ͤͦͬ͛̃̑͞͞и̒ͥͤͯ͂ͣ̐̉̑ͫ̉̑҉̛͏̸̻͕͇͚̤͕̯̱̳͉ͅф̴̴̡̟̞͙̙̻͍̦͔̤̞̔̓́̍͗̚͢͞ͅт̨̐ͫ̂͊̄̃ͥͪ͏̫̺͍̞̼͈̩̥̜͔͜͜ы̸̴̱̺̼̠̦͍͍͍̱̖͔̖̱͉̅͑͌͒ͫ͒̀ͥ͐ͤ̅͘̕.̵̴̡̭̼̮͖͈̙͖͖̲̮̬͍͙̼̯̦̮̮ͦ̆̀̑̌ͮͧͣͯ̔̂́͟г͌ͮ̏̈͂ͯ̚҉̛̙̬̘̲̗͇͕̠̙͙̼̩͚̀͘͞ͅо̷̥̯̘̓ͤ̽͒̋̉̀̂̄̒̓̊ͨ͛́̌ͤ̂̀͠в̶̒͒̓̏̓̚҉̛̙̘̺̰̮̼̟̼̥̟̘̠̜͜н̸̷̸̲̝͈͙̰̟̻̟̰̜̟̗͎̻̻͍̿̔̃ͨ͑о̔̀̋ͫ̇̿̐ͫ͌͗ͩ҉̨̜̙̙͈͍̮̮̼̙̘̞̕͜͡ Войти !bnw Сегодня Клубы
Привет, TbI — HRWKA! 1239.0 пользователей не могут ошибаться!
?6941
прекрасное6442
говно5903
говнорашка5512
хуита4706
anime3064
linux2649
music2633
bnw2597
рашка2565
log2352
ололо2151
pic1815
дунч1808
сталирасты1491
украина1439
быдло1436
bnw_ppl1409
дыбр1238
гімно1158

http://www.cs.wustl.edu/~schmidt/win32-cv-1.html > 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.
#DSX439 (0+1) / @octagram / 4475 дней назад
Как удалённо усыпить/пробудить тред? Linux-специфичные хаки, не предусмотренные pthread'ами, тоже устраивают.
#7F1SM0 (2) / @l29ah / 4584 дня назад
Бэнвач, подскажи. Есть у меня несколько тредов, которые должны принимать-отсылать данные через один udp сокет. Дескриптор сокета создается в main(дескриптор сокета обьявлен глобально), затем стартуются треды. Столкнулся я с тем, что recvfrom возвращает bad file descriptor.
#CL6SRZ (0) / @grouzen / 4980 дней назад
ipv6 ready BnW для ведрофона BnW на Реформале Викивач Котятки

Цоперайт © 2010-2016 @stiletto.