Warning: mkdir(): No space left on device in /var/www/tgoop/post.php on line 37

Warning: file_put_contents(aCache/aDaily/post/hft_dev/--): Failed to open stream: No such file or directory in /var/www/tgoop/post.php on line 50
Один микросек - C++, low latency, concurrency, HFT@hft_dev P.9
HFT_DEV Telegram 9
UBBook: https://github.com/Nekrolm/ubbook - довольно интересная серия заметок про undefined behavior в языке.

Несложный пример с condition_variable из книги:
void thread1() {
std::unique_lock lock { event_mutex };
cv.wait(lock, [&] {
return event_happened;
});
}

void thread2() {
...
event_happened = true;
cv.notify_one();
}

Мы здесь видим, что в thread2 event_happened изменяется без мьютекса, и знаем, что это некорректно. Но что конкретно может произойти не так?
👍3



tgoop.com/hft_dev/9
Create:
Last Update:

UBBook: https://github.com/Nekrolm/ubbook - довольно интересная серия заметок про undefined behavior в языке.

Несложный пример с condition_variable из книги:

void thread1() {
std::unique_lock lock { event_mutex };
cv.wait(lock, [&] {
return event_happened;
});
}

void thread2() {
...
event_happened = true;
cv.notify_one();
}

Мы здесь видим, что в thread2 event_happened изменяется без мьютекса, и знаем, что это некорректно. Но что конкретно может произойти не так?

BY Один микросек - C++, low latency, concurrency, HFT




Share with your friend now:
tgoop.com/hft_dev/9

View MORE
Open in Telegram


Telegram News

Date: |

It’s easy to create a Telegram channel via desktop app or mobile app (for Android and iOS): How to Create a Private or Public Channel on Telegram? How to build a private or public channel on Telegram? Ng, who had pleaded not guilty to all charges, had been detained for more than 20 months. His channel was said to have contained around 120 messages and photos that incited others to vandalise pro-government shops and commit criminal damage targeting police stations. Don’t publish new content at nighttime. Since not all users disable notifications for the night, you risk inadvertently disturbing them.
from us


Telegram Один микросек - C++, low latency, concurrency, HFT
FROM American