synchronization

How can I fix this touch event / draw loop "deadlock"?

Just want to start out by saying this seems like a great site, hope you guys can help! I'm trying to use the structure laid out in LunarLander to create a simple game in which the user can drag some bitmaps around on the screen (the actual game is more complex, but that's not important). I ripped out the irrelevant parts of LanderLande...

synchronizing audio over a network

I'm in startup of designing a client/server audio system which can stream audio arbitrarily over a network. One central server pumps out an audio stream and x number of clients receives the audio data and plays it. So far no magic needed and I have even got this scenario to work with VLC media player out of the box. However, the tricky ...

Java: serial thread confinement question

Assume you have a Collection(ConcurrentLinkedQueue) of Runnables with mutable state. Thread A iterates over the Collection and hands the Runnables to an ExecutorService. The run() method changes the Runnables state. The Runnable has no internal synchronization. The above is a repetitive action and the worker threads need to see the chan...

Bash scripting problem

I'm writing a bash script to sync my iTunes music directory to a directory on a removable hard drive. The script works fine when there is absolutely nothing in the folder on the external hard drive. Once all files have been copied to the external drive, then the script begins to act strange. Even though i just sync'd everything over, it ...

MS Sync framework - Identity crisis resolution by partitioning the primary key.

Hello, We implementing offline feature to an existing application. We have implemented the syn with SQL Server internal change tracking and over WCF using MS Sync Framework (http://msdn.microsoft.com/en-us/sync/default.aspx) All of our tables have primary key as integer, we cannot move to GUID. So as you are thinking we will have id...

Develop a custom file sync provider over file transfer WCF service

Hi All I'm trying to develop a custom sync provider to sync files over the internet using WCF service. We already have a file transfer service and it's working in production but I need to implement a custom sync provider on top of it. I've checked the solution in Braynt Likes blog here but this doesn't fulfill my needs. Any advices, g...

Is is necessary to create a Mutex for a read-only thread and a write-only thread?

There are 2 threads,one only reads the signal,the other only sets the signal. Is it necessary to create a mutex for signal and the reason? UPDATE All I care is whether it'll crash if two threads read/set the same time ...

Synchronize a client database with the central database

I need to update existing data or insert new data from client database say DB1 into central database say DB2 both holding same schema and both databases reside in same machine. The updates are not biderectional. I just want changes to be reflected from client(DB1) to server(DB2). The client database(DB1) is nothing but the backup datab...

SQL Server schema comparison - leaves behind obsolete files on synchronization

Directly related to http://stackoverflow.com/questions/2768489/visual-studio-2010-database-project-is-there-a-visual-way/2772205#2772205 I have a problem synchronizing between database project and a database in Visual Studio. Usually I synchronize FROM database TO database project (using the Visual Studio > data > scheme compare > new ...

Shared mmap co-ordination using fcntl locks?

When using mmap() for shared memory (from Linux, or other UNIX-like systems) is it possible (and portable) to use fcntl() (or flock() or lockf() functions) to co-ordinate access to the mapping? Responses to this SO question seems to suggest that it should work. The idea I have in mind would be to have the shared memory structured with...

Synchronizing in SQL Replication works when manually syncing, but not automatically

I'm using SQL Server 2005 to create a replication copy of the main databases, so that the reports can point to the replication copy instead of locking out our main databases. I have set up the 3 databases as publications and then 3 subscribers moving the transactions over to the subscribers, instantaneously I hope! What seems to be hap...

Why AutoResetEvent and ManualResetEvent does not support name in the constructor?

On .NET Framework 2.0 AutoResetEvent and ManualResetEvent inherit from EventWaitHandle. The EventWaitHandle class has 4 different constructors. 3 of the constructors support giving a name to the event. On the other hand both ManualResetEvent and AutoResetEvent do not support naming and provide a single constructor that receives the initi...

synchronize function C#

how can i do in C# that my function will be guarded by mutex semaphore a.k.a synchronize function in JAVA ...

Recognizing synchronization object hanging two 3rd party executables

I'm using a 3rd party tool, which uses a 4th party plugin. Occasionally, the tool will hang when launched. Looking at the stack traces, I can see a few threads are waiting on WaitForSingleObject, and my bet is that they're blocking each other. Some of the threads start at the 3rt party tool, and some at the 4th party plugin. What I'd li...

When do we make a call to use between Synchronised method and Synchronised Block

Can any one please share their experience on "When do we make a call to use between Synchronised method and Synchronised Block" Any Performance Issues? ...

Can Windows Mobile Synch Services use a business layer

We're building a Win Mobile 6 warehouse app which needs to update our server based corporate DB. We've got a C# business layer that sits on our app server and we'd really like our warehouse app to go through this. We also like MS Synch Services. Is there a way to combine the two ie can we use sync services but get them to go through o...

How to unit test synchronized code

Hi, I am new to Java and junit. I have the following peice of code that I want to test. Would appreciate if you could send your ideas about what's the best way to go about testing it. Basically, the following code is about electing a leader form a Cluster. The leader holds a lock on the shared cache and services of the leader get resum...

Do the ‘up to date’ guarantees for values of Java's final fields extend to indirect references?

The Java language spec defines semantics of final fields in section 17.5: The usage model for final fields is a simple one. Set the final fields for an object in that object's constructor. Do not write a reference to the object being constructed in a place where another thread can see it before the object's constructor is finished. I...

How to Sync a C# Application in-memory object

I have a WCF service to be load balanced with NLB (Windows Network Load Balancer). So I need a Dictionary object to be synced across all the instances of the WCF service. What is the best possible way to do this? ...

Any suggestions on data syncronization from a server to a desktop?

I have a web based CRM system that stores all the client data from all the clients into one database (MS Sql Server). We need to build a system that maintains a local copy of the data for each client. So basically the client database will have all tables and columns except for the ClientId that is in ever server table. I am aware that I ...