synchronization Questions
11
Raymond Chen has been doing a huge series on lockfree algorithms. Beyond the simple cases of the InterlockedXxx functions, it seems like the prevailing pattern with all of these is that they implem...
Esdraelon asked 15/4, 2011 at 18:28
3
I have been having trouble finding an example of what use cases are suitable for Vector Clocks and Version Vectors, and how they might differ. I understand that they largely work in the same way, w...
Albinus asked 24/10, 2019 at 15:20
9
Solved
What is it and how to use?
I need that as I have a timer that inserts into DB every second, and I have a shared resource between timer handler and the main thread.
I want to gurantee that if the ti...
Bumf asked 7/6, 2009 at 13:15
1
When using Git on multiple workstations, and for different Git repositories, it is convenient to have the same set of aliases available.
So, to synchronize the Git aliases across different workstat...
Spurling asked 3/6, 2021 at 18:36
3
Solved
I'm using java.util.Timer to schedule a periodic task. At one point, I'd like to shut it down, and wait for it to finish.
Timer.cancel() will prevent any future tasks from running. How do I make s...
Kowtow asked 24/8, 2009 at 10:37
42
Solved
I tried the code below. I took this piece of code from some other post which is correct as per the author. But when I try running, it doesn't give me the exact result.
This is mainly to print eve...
Hydrograph asked 22/5, 2013 at 10:29
4
When a synchronized method is completed, will it push only the data modified by it to main memory, or all the member variables, similarly when a synchronized method executes, will it read only the ...
Aerodonetics asked 31/7, 2012 at 5:27
5
Solved
I had a 2x2 array that I had two threads operating on.
it is possible to use a synchronized statement in java on an array?
how does the locking work? the java tutorial thread said that the synchr...
Geulincx asked 8/9, 2011 at 16:1
2
I am attempting to write a small demo program that has two cuda streams progressing and, governed by events, waiting for each other. So far this program looks like this:
// event.cu
#include <i...
Veridical asked 19/3, 2013 at 14:5
12
Solved
Is it true that C++0x will come without semaphores? There are already some questions on Stack Overflow regarding the use of semaphores. I use them (posix semaphores) all the time to let a thread wa...
Diorama asked 25/1, 2011 at 10:38
2
Solved
I need to synchronize the scroll event of two DataGridView controls, so that when I horizontally scroll the first DGV, second DGV also should be scrolled in the same way.
Is it possible? Could thi...
Pennywise asked 28/6, 2014 at 12:16
1
I have an async API which wraps some IO library. The library uses C style callbacks, the API is C++, so natural choice (IMHO) was to use std::future/std::promise to build this API. Something like s...
Zenobiazeolite asked 3/4, 2018 at 12:18
8
Solved
What is the difference between lock and Mutex? Why can't they be used interchangeably?
Kahaleel asked 17/9, 2010 at 12:29
5
I want to mirror a git repo to my local repo, and wish to
timely sync them, I did like this:
git clone --mirror source_url source_repo
cd source_repo
git push --mirror local_url
Now I have mirr...
Foretooth asked 2/1, 2018 at 2:55
0
Here is a simple example of acquire-release semantics used for data synchronization across threads.
// thread 1 // thread 2
data = 100;
flag.store(true, std::memory_order_release);
while(!flag.loa...
Anabolism asked 16/7, 2022 at 13:5
5
Solved
I forked a project on github, made some changes, so far so good.
In the meantime, the repository I forked from changed and I would like to get those changes into my repository. How do I do that ?
...
Bracteole asked 30/11, 2010 at 11:16
8
Solved
When to use a semaphore and when to use a conditional variable?
Illustrator asked 18/8, 2010 at 14:19
3
Solved
Is it safe to use __syncthreads() in a block where I have purposefully dropped threads using return?
The documentation states that __syncthreads() must be called by every thread in the block or el...
Adhibit asked 12/7, 2011 at 15:4
10
Solved
We have multiple threads calling add(obj) on an ArrayList.
My theory is that when add is called concurrently by two threads, that only one of the two objects being added is really added to the Ar...
Blocked asked 26/4, 2010 at 18:46
1
Pushlocks are used internally by windows as synchronization primitives for some of its operations, specifically as part of the memory manager.
What exactly is a pushlock? How is it different from ...
Mcallister asked 3/8, 2009 at 22:50
6
Solved
I would like to have a synchronized copy of one folder with all its subtree.
It should work automatically in this way: whenever I create, modify, or delete stuff from the original folder those cha...
Monarch asked 17/9, 2012 at 13:29
13
When should we use mutex and when should we use semaphore ?
Diocesan asked 28/10, 2010 at 5:0
1
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 there. How to do it?
Thanks!
Americano asked 31/12, 2020 at 21:52
5
Solved
I cannot find anything resembling file locking like some programs use in Linux to prevent multiple instances from running. In Python, I'd use pylockfile.
Am I overlooking similar functionality in R...
Gherardi asked 14/12, 2014 at 13:43
24
At my work I currently have my development environment inside a Virtual Machine. When I need to do work from home I copy my VM and any databases I need onto a laptop drive sized external USB drive....
Rouble asked 12/1, 2009 at 5:58
© 2022 - 2024 — McMap. All rights reserved.