synchronization Questions
3
Solved
This question is based on Synchronizing on an Integer value.
The solution there seems excellent only there is small problem it does not address the concern how to delete values from ConcurrentHash...
Trolley asked 15/10, 2012 at 6:14
9
What's the best way to synchronize times to millisecond accuracy AND precision between machines?
From what I understand, the crystals on PCs are notorious for clock skew. If clocks are always skewing, what is the best way to synchronize clocks between machines, with millisecond accuracy and pr...
Foster asked 18/9, 2008 at 23:5
1
The CRUD-based part of our application needs:
Offline bidirectional "two-way" syncing
Ability to modify data until ready and then "publish".
Audit log
Event Sourcing (or the "command pattern") ...
Foliose asked 11/2, 2016 at 21:52
3
In store, there is an event beforeload:
beforeload( Ext.data.Store store, Ext.data.Operation operation, Object eOpts )
by listening to this event, i can add my additional param to operation when...
Skirl asked 8/6, 2013 at 10:9
3
I'm considering moving to Angular2 from my trusted backbone (or should I say, my boss wants to play with a new toy, which is fine by me), I searched a lot online and made some tests but I can't see...
Drink asked 15/2, 2016 at 8:59
1
Solved
i am trying to concatenate 3 mp4 files into 1.
This is the ffmpeg command im making:
shell_exec('ffmpeg -f concat -i '.$random.'.txt -c:v libx264 -preset ultrafast -crf 30 -c:a copy '.$uploadfolde...
Executant asked 14/2, 2016 at 19:23
6
Solved
Here is a piece of text I found at this link.
"Avoid lock on static methods
The worst solution is to put the "synchronized" keywords on the static
methods, which means it will lock on all in...
Dermatitis asked 11/3, 2013 at 1:4
2
Solved
I'm doing some exercise about convolution over images (info here) using OpenCL. When I use images whose size is not a square (like r x c) CLK_LOCAL_MEM_FENCE makes the program stop with abort trap ...
Backlog asked 5/2, 2016 at 9:35
1
I have been reading Memory Barriers: A Hardware View For Software Hackers, a very popular article by Paul E. McKenney.
One of the things the paper highlights is that, very weakly ordered processor...
Cultrate asked 31/1, 2016 at 15:35
0
I would like to understand how database replication works conceptually. I know that databases have their own log (e.g., the OpsLog in MongoDB), but most information you can find on the web is about...
Evidence asked 2/2, 2016 at 15:10
2
Solved
I'm trying to move some of my old projects from ThreadPool and standalone Thread to TPL Task, because it supports some very handy features, like continuations with Task.ContinueWith (and from C# 5 ...
Chrysalis asked 2/2, 2016 at 0:22
5
I'm writing a fast multi-thread program, and I want to avoid syncronization (the function which would need to be syncronized must be called something like 5,000,000 times per second, so even a mute...
Wanonah asked 4/1, 2011 at 9:12
2
Solved
I have one Golang struct shared among multiple goroutines.
For concurrent access to struct members, there is the mutex sync.RWMutex.
For struct member that is accessed by one single goroutine, is t...
Vidavidal asked 29/1, 2016 at 12:10
3
Solved
I have multiple threads writing data to a common source, and I would like two threads to block each other if and only if they are touching the same piece of data.
It would be nice to have a way to...
Malign asked 3/11, 2014 at 22:28
10
Solved
I have one producer and many consumers.
the producer is fast and generating a lot of results
tokens with the same value need to be processed sequentially
tokens with different values must be proc...
Lownecked asked 8/1, 2016 at 19:31
5
Solved
What is the usage of synchronized statements?
Demonstrator asked 12/8, 2009 at 18:50
2
Solved
Supposedly I have the following class definition, when one thread wants to set a for multiple (potentially) waiting threads:
public class A {
private int a;
private CountDownLatch gate;
...
Garratt asked 13/1, 2016 at 10:44
2
Solved
Can anyone explain what exactly the Android Backup API is used for?
I have read Using the Backup API and Data Backup from the Developer Docs, but it is still unclear to me.
When is data backed up...
Flimflam asked 13/1, 2013 at 1:13
2
Solved
Consider the following class:
class Ideone
{
private Map<String, String> m;
public Ideone(){
synchronized(this){
m = new ConcurrentHashMap<>();
}
}
public synchronized Map<S...
Judithjuditha asked 8/1, 2016 at 8:7
1
Solved
I have a class that is similar to this:
public class ExpensiveCalculation {
private Executor threadExecutor = ...
private Object lock = new Object();
private Object data = null;
public Objec...
Czardom asked 2/1, 2016 at 8:46
3
Java provides a very convenient idiom for synchronizing critical portions of code:
synchronized(someObject) {
// do something really important all by myself with nobody bothering me
}
Or
publi...
Illustrious asked 18/9, 2013 at 19:20
3
Solved
I'm using LinkedBlockingQueue between two different threads. One thread adds data via add, while the other thread receives data via take.
My question is, do I need to synchronize access to add and...
Swabber asked 23/4, 2010 at 0:23
3
Solved
I'm not a professional programmer, but I do some small solo projects and I would like some versioning and syncing, but going through the process of remember to commit and checkout (on different com...
Boman asked 15/8, 2011 at 0:18
1
I have two threads, one thread should receive and process requests from another. The second is to transfer requests and receive a response synchronously. I tried the following scheme: queue of pair...
Godroon asked 19/12, 2015 at 12:54
3
Solved
Which Java synchronisation object should I use to ensure an arbitrarily large number of tasks are completed? The constraints are that:
Each task takes a non-trivial amount of time to complete and...
Levitt asked 14/12, 2015 at 8:20
© 2022 - 2024 — McMap. All rights reserved.