Questions tagged [synchronization]

Synchronization refers to using controls to maintain a coherent representation, either a group of processes running the same program (process synchronization), or representations of data (data synchronization).

In computer science, synchronization refers to one of two distinct but related concepts: synchronization of processes, and synchronization of data. Process synchronization refers to the idea that multiple processes are to join up or handshake at a certain point, so as to reach an agreement or commit to a certain sequence of action. Data synchronization refers to the idea of keeping multiple copies of a dataset in coherence with one another, or to maintain data integrity. Process synchronization primitives are commonly used to implement data synchronization.

-from Synchronization (computer science) - Wikipedia

12446 questions
4
votes
1 answer

Database synchronization Server to Local

I have a local app that uses SQLite. Whenever it has internet access it requests the whole database from the server and recreates the local one from that. Local and Server databases have the same structure, basically the point of the local one is to…
Francisc
  • 77,430
  • 63
  • 180
  • 276
4
votes
3 answers

Creating a modal dialog in GWT

I'm a GWT and Java newbie trying to figure out how to create a synchronous (modal) dialog in GWT, but I'm having difficulty. The DialogBox class has a flag that says: modal - true if keyboard and mouse events for widgets not contained by the dialog…
Mitch
  • 1,716
  • 3
  • 25
  • 41
4
votes
3 answers

C# Synchronize two objects through events

I have 2 objects. Foo and Bar in two different threads. Now I want to raise an event in Foo but in the thread of Bar. and how can I use SynchronizationContext.Current for that?
Tarion
  • 16,283
  • 13
  • 71
  • 107
4
votes
0 answers

How to enforce immediate Coredata & CloudKit sync?

The setup: My app uses either private data, i.e. data of a user identified by the iCloud login, or shared data, i.e. data of another user, shared via iCloud. It uses thus 2 persistent stores, private and shared. Both are mirrored by Coredata &…
Reinhard Männer
  • 14,022
  • 5
  • 54
  • 116
4
votes
3 answers

Most Efficient Lock for Many Writers Single Reader Concurrency Model?

So I have many threads that are feeding me input data, which must be processed by a single thread in order of arrival. Currently, all the input items wind up inserted in a queue, and read/writes to the queue are protected with the C# lock…
GWLlosa
  • 23,995
  • 17
  • 79
  • 116
4
votes
2 answers

Syncing multiple Varnish Cache servers

We have two servers, web1 and web2, each running Apache and Varnish. They are load balanced, with a persistence of 30 mins. In our testing, we've found some cases were pages are cached on one instance of Varnish (say web1), but not on Varnish on…
KM.
  • 1,382
  • 1
  • 19
  • 34
4
votes
2 answers

Does using Vector inside synchronized block make any difference?

I was asked this question in an interview. Vector is already synchronized. Will it make any difference to call it inside a synchronized block? synchronized{ // Call the vector here } My answer is, there wouldn't be…
Vinoth Kumar C M
  • 10,378
  • 28
  • 89
  • 130
4
votes
2 answers

git-svn: keeping git repo and svn repo in sync

We have a new git repo that is acrued from a svn repo. The git repo is now the leading repository where the further development will happen. This repo is a hosted one. The svn repo on the other side will remain as a publishing pipeline to non git…
Udo
  • 2,300
  • 1
  • 23
  • 27
4
votes
4 answers

Sharepoint Workspace 2010 Local Store Location

When setting up local synchronization with a Sharepoint 2010 site using Sharepoint Workspace, where are the local files stored? More importantly, how can I change the storage location? There is a folder-like object created under…
Jason
  • 41
  • 1
  • 1
  • 2
4
votes
2 answers

Why does cypress variable inside of it() stay as the last value assigned to that variable, whereas outside of it() it works correctly? (Example)

If my code is: context('The Test', () => { let testStr = 'Test A' it(`This test is ${testStr}`, () => { expect(testStr).to.eq('Test A') }) testStr = 'Test B' it(`This test is ${testStr}`, () => { expect(testStr).to.eq('Test B') …
4
votes
1 answer

std::condition_variable memory writes visibility

Does std::condition_variable::notify_one() or std::condition_variable::notify_all() guarantee that non-atomic memory writes in the current thread prior to the call will be visible in notified threads? Other threads do: { std::unique_lock…
4
votes
2 answers

WinForms multithreading issue

Ive got a thread that does some work in the background and passes updates to the Form using the Invoke, BeginInvoke methods. The thread is created after the form is displayed so no issue there. The issue is how to correctly shutdown. My worker…
Will
  • 101
  • 1
  • 3
4
votes
2 answers

WaitForSingleObject with thread handle get stuck while running regsvr32.exe

I have thread A that is creating another thread B, than thread A is waiting using WaitForSingleObject to wait until thread B dies. The problem is that even though thread B returns from the thread's "thread_func", thread A does not get signaled!. I…
TCS
  • 5,790
  • 5
  • 54
  • 86
4
votes
1 answer

Vulkan: can work submitted after waiting on a fence read previous submit's writes?

After a thorough read of the Vulkan spec's language on synchronization, I'm trying to confirm that a specific scenario does not introduce a data race. Consider the snippet below, where work in a second queue submit reads the results of work from the…
Daniel S.
  • 312
  • 1
  • 8
4
votes
3 answers

C# Synchronized object - duplicate code with writing accessors

I like to use objects which sync itself using a private object which is locked when the property is changed. Is there any generic way to achieve this? My code looks always like this for each property (with one locker object) private Object locker =…
weismat
  • 7,195
  • 3
  • 43
  • 58