I was just saw code like this /* whatever */ foo(std::string const& s) { // stuff auto L = s.length(); int i{/* init based on L */}; whil ...
I was just saw code like this /* whatever */ foo(std::string const& s) { // stuff auto L = s.length(); int i{/* init based on L */}; whil ...
Why do I get Collection was modified exception if I have a predefined collection and its values are accessed and updated by index only. No thread dele ...
I've a private static method in a class that has all the methods as static. It's a helper class that helps with logging and other stuff. This helper c ...
I am creating a server that stores the TcpStream objects inside a Vec to be used later.The problem is the function that listens for new connections an ...
Is this code thread safe? Do I need a synchronized block or something like that? source1 and source2 endless Kotlin Flow ...
I have a Java application that is populating a database in a multithreaded environment (about 100 inserts per second). I have section that is doing i ...
I have 2 dictionaries in a scoped service within a Blazor server application I use to manage state for multi tenancy. It has come to my attention that ...
I understand that the C++ "magic static" pattern guarantees thread-safe initialization of a local variable, since C++11. Does this hold true no matter ...
Preamble: (I don't know if this is the right word for it) I know that the List is not thread-safe and am aware of the existence of concurrent col ...
The given code attempts to run a fire-and-forget Task while acquiring a lock to avoid race conditions on a cached element. while debugging the whole a ...
I was reading the source code of ConcurrentQueue, here are some code: GetHeadTailPositions() may want to get 4 variables at a particular time, howe ...
Consider the following code block If multiple threads are calling Get() - will the method be thread-safe? In addition - will invoking .ToList() at ...
I'm struggle to full understand Boost ASIO and strands. I was under the impression that the call to socket::async_read_some() was safe as long as the ...
I have a thread (This is a Pthread in C implementation) which reads a value from a file every 5 secs. During shutdown, this causes an issue where the ...
I want to switch to background to load an image (or do any other task) and then return to Main thread to give a command to my view to display smth. Ex ...
I'm using QtConcurrent::run (I know other APIs of QtConcurrent has built in support for progress reporting but I can't use them for other reasons). to ...
I have created a coroutine extension function to run a coroutine in the background periodically at fixed interval. Now, I run a coroutine as follow ...
The function should get the HTML Document, working on a Thread. The ExecuteScriptAsync needs to manage a Task which cause execution error if I run it ...
I have a generic List<T> in which live streaming data coming from web socket is getting stored. I want to store the data from the generic list t ...
As I understand, the EGL14.makeCurrent() function maps the thread to the EGLContext we created. And every EGL operations we execute will be executed o ...