I have a multithreaded application (C++) where I need to increment/change a series of values.
If I use a series of Interlocked operations, are they considered to be a single atomic operation ? Like in this example:
InterlockedIncrement(&value1);
InterlockedIncrement(&value2);
InterlockedExchange(&oldValue, newValue);
Or it would be be...
This is a composed concurrent list multimap implementation. A lower-level implementation would be better, but more complex.
Ignoring the O(n) removal in the sublist, is this the correct way to compose a ConcurrentMap and CopyOnWriteArrayList into a functional ConcurrentMultimap? Are there any unresolved data races?
private final Concur...
What would be a simplest algorithm one or more people could use to decide who of them should perform some task? There is one task, which needs to be done only once, and one or more people. People can speak, that is, send messages one to another. Communication must be minimal, and all people use the exact same algorithm.
One person sayin...
Hi All,
I have a simple method which is called from multiple threads;
@Override
public Bitmap getFullBitmap(Filter f, ProgressCallback<String> pc) {
// Requires synchronisation?
Bitmap bitmap = fullMap.get(f.id);
if(bitmap == null){
f.setProgressCallback(pc);
bitmap = f.e.evaluate(currentBitmap);
fullMap.put(f.id, bitmap);
}
...
Hi,
We are looking into web synchronization between SQL2005 standard &
offline clients using Express2005.
When I create subscription and synchronize for first time it works fine. But when I reintialize the subscription and synchronize it is giving me below error.
"The format of a message during Web synchronization was invalid. Ensure ...
There's this WIN32 process, which someone says:
The servide takes a lock on the kernel
object and does not release. After a
while the machine becomes irresponsive
and has to restarted. Restanting only
the service won't fix the issue.
According to my knowledge applications were not supposed to be able to crash the entire sys...
I'm working on a windows platform and want to be able to auto sync my files one way 'on change' to my virtual windows or linux web server - also need to be able to filter file types. i can connect to the remote machine via network drives.
i'm ideally looking for a free, easy to set up solution - a commercial product that does what I nee...
i have emacs at home and at work. How to synchronize them if i add new package?
...
I have two clients A and B. Both clients have identical, synced local data caches.
If client A makes an offline edit to record X and then client B also offline edits record X and syncs with the server, when client A syncs with the server, the change that client B made is not reflected and no amount of bidirectional syncing makes the tw...
We have an ASP.NET web application hosted by a web farm of many instances using SQL Server 2008 in which we do aggregation and pre-processing of data from multiple sources into a format optimised for fast end user query performance (producing 5-10 million rows in some tables). The aggregation and optimisation is done by a service on a ba...
MS has a good file/directory sync framework called Windows.Synchronization.Files, but it is not available for Mobile! Does anyone know what the standard way is of getting this functionality on Windows Mobile? I know ActiveSync allows you to transfer and sync files, but so far I haven't been able to find the API that they use for this. Is...
I have a object map on my server (objects representing Customers, Orders, Items, related to each other, based on content from a database) and want to keep an up to date version of that object map in the browser where the user is manipulating and viewing the data.
Since more users can access and modify the same object map at the same tim...
Hello,
Im developing a silverlight app and I need to synchronize a list in different silverlight instances that can be offline. I'll have a server online to sync them.
So we can imagine this:
pc1: A1 A2 A3
pc2: A1 A2 (A3 deleted)
server: A1 A2 A3 (deletes A3 to reflect
pc2 and then updates pc1 to also delete)
It mus...
Hi, programmer mates. I was testing java threading capabilities with a very simple code (or at least it seemed simple). I have this class Account:
public class Account {
protected double balance;
public synchronized void withdraw(double value) {
this.balance = this.balance - value;
}
public synchronized void deposit(double value...
What want to be accomplished is:
I want to "synchronize web browsers". my site has a "wait URL" where when browser gets there it will be kept waiting till another browser also go there and then both will be presented with a quiz-like game.
Right now the wait url will call each second to Rails to check if other player came to the game. H...
In my embedded project I have to move(sync) data between two systems.
The data structure is complex and hence need some quick utility.I guess i should convert my data to XML format and sync it using rsync ?
Boost is not going to be there on our embedded platform.
Could someone suggest lightweight yet efficient library to convert my da...
Will this code ever wait on the mutex inside the producer's void push(data)?
If so how do I get around that?
boost::mutex access;
boost::condition cond;
// consumer
data read()
{
boost::mutex::scoped_lock lock(access);
// this blocks until the data is ready
cond.wait(lock);
// queue is ready
return data_from_queue();
}
//...
I have a datalogging application (c#/.net) that logs data to a SQLite database. This database is written to constantly while the application is running. It is also possible for the database to be archived and a new database created once the size of the SQLite database reaches a predefined size.
I'm writing a web application for reportin...
I've a table which contains sequence number.
Table structure
SequenceGenerator
Year int
Month int
NextNumber int
Year + Month make primary key. Sequence is reset every month.
I'm using Subsonic to generate DAL. To get next sequence number I've written a class which returns next number to requestors:
private static rea...
Searching here I found that this question was already asked, but I think my situation is worse!-(
I'm a total novice with Internet repositories development. A book I'm reading contains an interesting sample project - a social network in ASP.Net. The author put the code as a CodePlex project. I tried to "get" the version through VisualSV...