Category "synchronization"

Visible order of operations with acquire/release fence in C++

I have a following program which uses std::atomic_thread_fences: int data1 = 0; std::atomic<int> data2 = 0; std::atomic<int> state; int main() {

Camunda: Receive multiple, different messages at once

I am currently developing a kinda complex workflow with camunda. The goal of this workflow is to orchestrate the execution of different external business proces

Compute shader how to update a shared resource with proper locking/unlocking

I'm currently investigating if it's technically feasible to move some calcuations from a CPU implementation to compute shaders. There is a step where I really n

Making Consumer/Producer Problem a bit Advanced

Is there any way for the Consumer/Producer problem in synchronization could be made more advanced by introducing some scenario or making it a little bit more co

AtomicReference not working to avoid race condition in java multi threading

I have a "User.java" class that has Integer variable count initially set to 0. In another class "ThreadDemo.java" I have set the User object in AtomicReference.

Do __shfl_xx_sync() intrinsics with mask need an additional __syncwarp()?

Do __shfl_xx_sync() instructions, where only some lanes participate, need an additional __syncwarp() instruction, or is setting a mask enough? I cannot provide

Using optimistic locks in C++ and memory order

I'm wondering how 'optimistic locks' (as described e.g. here: https://db.in.tum.de/~leis/papers/artsync.pdf) can be used in C++ with regard to non-atomic data a

Numba support for cuda cooperative block synchronization?? Python numba cuda grid sync

Numba Cuda has syncthreads() to sync all thread within a block. How can I sync all blocks in a grid without exiting the current kernel? In C-Cuda there's a coo

How to copy vs code settings from one github account to another

I have two github accounts and currently vs code settings is synced with one account but I want copy the settings to the second github account and sync from the

How to synchronize to curves on matplotlib?

I have two curves that have their maximum roughly at the same time, but I'd like to match them exactly. The first function, maxind, determines where the maximum

Range on Unbuffered chan with go routines throws all goroutines are asleep - deadlock [duplicate]

I have written a sample program to do file search, it does the search but fails at the end with fatal error: all goroutines are asleep - deadl

Sleeping barber using semaphore

I am having a problem in the synchronisation of threads. I m trying to implement sleeping barber problem in a different approach. When i run the code the thread