synchronization

How do I know when a child process died?

In my class I run 4 process. from multiprocessing import Process procs = ( Process(target=ClassOne, name='ClassOne'), Process(target=ClassTwo, name='ClassTwo'), Process(target=ClassThree, name='ClassThree'), Process(target=ClassFour, name='ClassFour'), ) for p in...

Synchronizing the database failed with the message 'string truncation...'

Using N-Tier synchronization to a Microsoft Compact DB: http://msdn.microsoft.com/en-us/library/bb882690.aspx. Trying to refresh the local database cache to account for changes in the schema of the db we are syncing against. In the middle of Synchronizing local database cache, the message Synchronizing the database failed with the mes...

Does a Deadlock Occur in This Case?

Am I right in saying that a deadlock is supposed to happen in the following case: Object P calls a synch method of object A, that calls a synch method of object B, that calls a synch method of object A. Sorry if it looks stupid of me, most probably it is. But that's why I'm asking. Thanks! ...

Synchronize Read Write Collection in .NET

I have an object which holds a collection of items. I want to be able to add items to the collection through an AddItem method and also to go through all of the items in the collection. My object must be thread safe. I am using a ReaderWriterLockSlim to assure proper synchronization. How should I synchronize the GoThroughAllItems method?...

In Sync Framework serverProxy.GetScopeDescription() fails during running the WebSharingAppDemo-CEProviderEndToEnd sample

I am running the WebSharingAppDemo-CEProviderEndToEnd saPLE WITH sqlExpress 2005 Beta as server and havin the SQl Express as Client. The Programs runs well till it reaches to SynchronizationHelper.cs class where it checks CheckIfProviderNeedsSchema(remoteProvider as SqlSyncProviderProxy); from there it tries to retrieve the scope descr...

Recursive / nested locking in C# with the lock statement

Possible Duplicate: Re-entrant locks in C# I've looked here on StackOverflow and on MSDN, and can't believe that I couldn't find this question lingering out there on the internets. Let's say I have a class with a private member that I want to access in several public methods. These public methods will be called by different ...

Java synchronized question

I'm new to Java Threads and synchronization. Lets say I have: public class MyClass(){ public synchronized void method1(){ //call method2(); } public synchronized void method2(){}; } What does it mean when I synchronize a method1() on an instance object? So when a thread acquired the lock when trying to acce...

Synchronization in J2ME

If one doesn't use Threads or Timers, they wouldn't need synch, as all input/output is handled by a single thread. However, if one introduces TimerTasks, synchronization would be mandatory. There are two ways to synch the code in J2ME: The usual: using locks Using Display.callSerially(Runnable r) so that all external events would be s...

Sync /etc/hosts file across multiple machines

Does anyone know an easy way to synchronize your /etc/hosts file across multiple machines? I use a MacBook, a MacMini, a Windows Machine as well as a Linux VM to develop websites with so it would be ideal to have all of them have the same hosts config. ...

Spring @Transactional concurrency

Hi; class MyService { public void a() { synchronized(somekey) { b(); } } @Transactional(propagation = Propagation.REQUIRES_NEW) public void b() { ...do DB works... } } My aim is 1 - get the key 2 - start transaction 3 - commit transaction 4 - release the key When i call a() method from outsid...

Outlook 2010 Folder Sync Needed for all Replicated Folders

In outlook 2010 you can replicate/sync several folders including other members inboxes, public folders etc. The issue is when outlook is opened only the opened folder is truly sync'ed up to date until you access others. (they sync on first use) I need a method to sync all the folders when Outlook is first launched or otherwise so they ...

Synchronize with Swing: Wait for the UI

Usually one is looking for a way to update the UI while something in the background is still working. My approach there would be either use a new thread or simply use SwingUtilities.invokeLater. However, right now I'm in the completely opposite situation. I have a button that calls a static method which does some magic (not important he...

SpinLock read_lock_irqsave flags attribute

Hi, This is regarding the void spin_lock_irqsave(spinlock_t *lock, unsigned long flags); function call. It is mentioned that previous interrupt state is stored in flags and we can restore them by passing this to spin_unlock_irqrestore function. But I did not get how flags which is passed by values captures the previous interrupt state...

synchronizing files and symlinks between two linux os.

I am facing with the bug following: https://bugzilla.samba.org/show_bug.cgi?id=4531 rsync will always get the older symlink of the other side overwrite the newer one on the local side. Wayne has suggested to use unison, however it is a non-developing old project that I have suspect to use. What can you suggest me for ? My main aim is...

Locking without hardware support

I think most locking techniques assumes or makes use of hardware support for atomic transactions. I remember reading about some locking/synchronization algorithms which doesn't need such support, but can't really recall them (token-based or something). Do they exist? If so can I get some links please? Thanks Jeenu ...

Is Microsoft Sync Framework 2.1 support this scenario?

Is Microsoft Sync Framework 2.1 support this scenario? I use ASP.NET 3.5 and Sql Server 2008. My scenario is that I want to sync data between two tables of Sql Server 2008 databases in two remote distributed places. 1) I totally own the two database server with remote desktop rights. 2) The database A has a table CustomerA with the c...

Syncing events with Google Calendar

I'm writing a service that needs an up-to-date information on a user's calendar. However, I have yet to find a way other than regular polling to receive updates from GCal. Is it possible to set up some kind of push notification or an event list diff transmission? ...

Ordering threads to run in the order they were created/started

Hi, How can i order threads in the order they were instantiated.e.g. how can i make the below program print the numbers 1...10 in order. public class ThreadOrdering { public static void main(String[] args) { class MyRunnable implements Runnable{ private final int threadnumber; MyRunnable(int thread...

Does glSubTexImage block?

Hi everyone! This is a question about syncronization in OpenGL. And the question is: At which point in the following (pseudo) code sample does syncronization happen. // 1. try to map buffer object (write only and invalidate buffer) copy new data to mapped buffer unmap buffer // 2. bind buffer call subteximage to fill texture f...

How to synchronize guest installations on virtualbox on 2 different machines?

I have two development PCs with Virtualbox installed. As a guest OS for both PCs I am using exactly the same -- content wise -- xubuntu. I use xubuntu to run a database and tomcat server. I would like to know how I can ensure that both guest installations on the different PCs are the same. Currently what I am doing after making big cha...