Category "atomic"

Are nested SQL queries atomic?

I have some micro service (almost) system where each program has its own port. Moreover, not all ports in the system are available. For simplicity, I decided to

Is std::condition_variable::notify_one reentrant?

Can I safely execute following code? Is it possible to have deadlock here or some unexpected behaviour, especially when SIGINT arrives? #include <atomic>

do sequentially-consistent atomic loads (load-load pair) form an inter-thread synchronisation point?

I am trying to understand what does sequentially-consistent ordering mean for loads. Consider this artificial example: #include <atomic> #include <thr

Spurious wakeup with atomics and condition_variables

std::atomic<T> and std::condition_variable both have member wait and notify_one functions. In some applications, programmers may have a choice between usi

Is the `is` operator thread-safe/atomic in C#?

Is the following code thread-safe? public object DemoObject {get;set;} public void DemoMethod() { if (DemoObject is IDemoInterface demo) { dem

Is it possible to read a value from memory being written by another thread, so that it's neither the original nor final?

Suppose we have a variable in memory, which is constantly being updated by a thread of execution by doing something like MOV into it with alternating values (si

How can I print value of std::atomic<unsigned int>?

I am using std::atomic<unsigned int> in my program. How can I print its value using printf? It doesn't work if I just use %u. I know I can use std::cout,