synchronization

How do I synchronize to prevent a java.util.ConcurrentModificationException

Hello I have program consisting of a number of classes. I have a problem with the interraction of two of the classes - WebDataCache and Client. The problem classes are listed below. WebData: This is just a data class representing some data retrieved from the internet. WebService: This is just a web service wrapper class which connects t...

access and sql server realtime synchronization

i have a security application that stores its data in a access database.now i'm required to make a realtime synchronization (replication) between that access database and a new database in sql server 2005. these two database are the same. any suggestion?! ...

OO design patterns for multi-threaded synchronisation

Are there any generalisations of object and data and thread interactions given design pattern names? Obviously what goes on a lot is synchronisation on an object, passing messages through a queue and also reference counts in memory management systems. But are there any more OO-oriented names for multithreading design patterns and syste...

iPhone: sqlite support synchronization system

hi all, i am new to iPhone. i want to ask that whether sqlite support the synchronization data with server database ...

SQlite synchronization scheme

Hi, I know it is xmas eve, so it is a perfect time to find hardcore programers online :). I have a sqlite db fiel that contains over 10 K record, I generate the db from a mysql database, I have built the sqlite db within my iphone application the usual way. The records contains information about products and their prices, shops and the...

BlackBerry - get only updated contacts from address book

Hi, I have an application for get and send contacts from blackberry but i need to send only updted contacts instead of all, so can i get only updated contacts from blackberry ? ...

How to stop one thread until n threads have completed their work.

Hello, I have an application with one main thread and N worker threads. At some point I need that the main thread waits until all the N threads have completed one section of their work. I normally would use Monitor.Wait() and Monitor.Pulse() but this will prevent the N threads from working at the same time. Any idea on how to do that?...

What's the point of this synchronization?

What is the point of the synchronization here? Why not just use: mConnectedThread.write(out); ? The code snippet is from the BluetoothChat sample for Android (found here) http://developer.android.com/resources/samples/BluetoothChat/index.html /** * Write to the ConnectedThread in an unsynchronized manner * @param out The bytes to...

C# Synchronizing different time zones.

I have an application on a server which is UK based. Say I needed the application to run at the same time for different countries. For arguments sake say I needed it to send an email to a mailbox whenever the time is 7pm in various countries. How would I be able to achieve this? At the moment I just have it running from the Task Sched...

Implementing synchronization algorithm in C#

Hi I trying to implement synchronization algorithm in C#, without success. Why isn't the following code thread safe? using System; using System.Threading; namespace SoftwareLockTest { class Program { private static volatile bool _isLocked1 = false; private static volatile bool _isLocked2 = false; priva...

How do 2 or more threads get synchronized using a timer in the Windows kernel?

I have been reading about the kernel using timers for thread synchronization. I haven't been able to find a decent explanation on how thread sync with timers works, I wondered if anyone can help me? MSDN: Kernel Dispatcher objects DPCs and timer objects <-- here it talks about 'synchronization timers' Also reading book Windows Intern...

How to implement a critical section in CUDA?

I'm trying to implement a critical section in CUDA using atomic instructions, but I ran into some trouble. I have created the test program to show the problem: #include <cuda_runtime.h> #include <cutil_inline.h> #include <stdio.h> __global__ void k_testLocking(unsigned int* locks, int n) { int id = threadIdx.x % n; while (atomi...

Synchronizing NHibernate Session with database - the reverse way

Hello I am using NHibernate for a project, and I am absolutely beginner. I am fetching some objects from a table and showing it to a form, where they can be edited. If an user inserts a new object into the table from some other window, I want to show this newly inserted object into the edit window. My application uses tabbed window inte...

Faking MS exchange whith php

Hi guys, first post on stackoverflow! We are developing a php contact manager. We wanted to create the possibility to sync the contacts with ms exchange enabled phones (android, iphone, blackberry). I found this link http://www.troywolf.com/articles/php/exchange_webdav_examples.php#create_contact but what I need is more on the sync side,...

When should one care about finishing one method before start next one?

Using C# in WPF, together with LINQ to SQL and LINQ for quering my generic collections, I noticed that sometimes, when I use several methods one after another and results of the first one are needed for next function, I should care about finishing actions of first function before starting next. SomeMethod() { FirstMethod(); NextMeth...

Syncronize databases

I am putting together a site made out of two scripts, with users. The 2 scripts have info about the members , they will act as one site so I need the users info to be the same on both. When the user fills in the info on the DB1 they should appear in the DB2 as well. The information fields I would need the same are basic: name, email, ...

In house simple data synchronization

Hi All, I know the post is long but it also contains suggested solutions to my problem. Therefore, the question itself is not that long... don't be scared. :) Please help me with the following scenario: I will have a SQL server where I will store data sets. I will also have a bunch of PC clients (all with their own local SQL server) ...

Java Synchronized Block for .class

What does this java code means? Will it gain locks on all objects of 'MyClass' synchronized(MyClass.class) { //is all objects of MyClass are thread-safe now ?? } And how the above code different from this one: synchronized(this) { //is all objects of MyClass are thread-safe now ?? } ...

Iphone syncing via cable

Hi guys I've made an IPhone App that communicates to a service by calling a webservice and exchanging data as xml. For this to take place, there should be WIFI access. What I'm trying to do now is to do the same but in places without WIFI access. The only way I can think of doing this would be through the USB cable (dock cable?). Unfor...

.NET - Thread sychronization

Hello, I've been working on a thread which will live aslong as the application is running, and runs at a interval of 500ms. I noted that i could be uselessly processing if there's nothing in the queue for it to process, so i went around looking at some sources i had locally, and i found an example close to mine, but it's in Java. The ...