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
5
votes
1 answer

pipe call and synchronization

I'm experimenting some problems with this code: #include #include #define SIZE 30 #define Error_(x) { perror(x); exit(1); } int main(int argc, char *argv[]) { char message[SIZE]; int pid, status, ret, fd[2]; ret =…
Fabio Carello
  • 1,062
  • 3
  • 12
  • 30
5
votes
4 answers

Synchronization in a Go-lang webapplication

I'm writing a golang web application. The web application accesses the file system (reading and writing) and an sqlite3 database file. Question 1: How can I synchronize file system access in Go? type DataObject struct { data []byte } func (*d…
Kiril
  • 6,009
  • 13
  • 57
  • 77
5
votes
3 answers

Grab content from another website daily

Here is my problem. I am creating a website which has a "news" tab. What i want on the news tab is updated content from another news website. Is there any way to grab plain text posted on another website, post it on a news tab in my website, and…
Brett Merrifield
  • 2,220
  • 6
  • 22
  • 21
5
votes
3 answers

TICoreDataSync connecting to web server backend?

I have been looking into alternatives to iCloud for core data sync, and one promising option is TICoreDataSync (the code can be found here). Are there any examples of modifying this to work on one's own web server, as opposed to uploading the sync…
Jason
  • 14,517
  • 25
  • 92
  • 153
5
votes
1 answer

How can I make a JavaScript synchronous call to the server?

Possible Duplicate: How can I get jQuery to perform a synchronous, rather than asynchronous, AJAX request? I have a method that returns initialization data. It first checks the sessionStorage. If it doesn't find the data there, it makes a call to…
James
  • 2,876
  • 18
  • 72
  • 116
5
votes
1 answer

Multi-threading Delphi synchronization using Critical Sections between a Timer and other threads

It is a problem of synchronization. I made a simplification for my problem so I have a VCL Timer and a few threads. The threads are trying to write things in two bitmaps, and the timer is trying to draw the bitmaps into Images(TImage). Here is a…
user558126
  • 1,303
  • 3
  • 21
  • 42
5
votes
1 answer

synchronized object not locked by thread before notifyAll()

I want to have a boolean to notify some sections of the system that a specific service started. For some strange reason I'm getting the error java.lang.IllegalMonitorStateException: object not locked by thread before notifyAll(). What is strange is…
J-Rou
  • 2,216
  • 8
  • 32
  • 39
5
votes
1 answer

Android Calendar Provider Sync - SYNC_DATA columns?

I'd like to sync between the internal Android calendar and my application. I'm using CalendarContract available from Android API 14 onwards. Any change of the content provider "com.android.calendar" calls onPerformSync(..) of my sync…
5
votes
1 answer

Does SyncAdapter support both uploading and downloading during a sync?

I am trying to write an Android SyncAdapter and am a little confused. During a sync (i.e. in onPerformSync() ), I want to be able to pull data down from a remote server but also push data up to a remote server (is that a 2-way sync? or is a 2-way…
Umbungu
  • 945
  • 3
  • 10
  • 30
5
votes
1 answer

Concurrent modification exception within synchronized methods

I made some modifications on my multithread program and started to get ConcurrentModificationException s at an object's HashTable, so I made all accesses to this HashTable into synchronised methods to avoid concurrent accesses to my object, unlike…
HericDenis
  • 1,364
  • 12
  • 28
5
votes
1 answer

pthreads: a thread that triggers other threads

Hello, I'm new to multi-thread programming. I'm trying to create a code that creates a thread THREAD1, that, after it has done something, it triggers two other threads, say THREAD2 and THREAD3, and then exits. I wrote two possible solutions. 1) Use…
seg.fault
  • 161
  • 1
  • 7
5
votes
4 answers

How to implement a lock-free shared flag in C?

I have one-producer-one-consumer model, in which I need for the producer to set a flag when data is available. I suspect I can get away without a lock on the shared flag because: The producer never checks the value before setting Missing an update…
brooks94
  • 3,836
  • 4
  • 30
  • 57
5
votes
3 answers

What happens to the lock when thread crashes inside a Synchronized block?

lets say Thread-1 synchronizes on object synchronize(object){ //statement1 //statement2 //statement3 } what happens to the lock on object if Thread-1 crashes on statement2, will JVM release the lock on Thread-1 automatically when this…
Robin Bajaj
  • 2,002
  • 4
  • 29
  • 47
5
votes
2 answers

Prevent multiple access of servlet in my application

given below is the url configured as an autosys job .This calls the servlet given below.Can anyone suggest me how to protect this method "psServiceWrapper.processHRFeed();" being called continously with improper data modification by each time this…
ashwinsakthi
  • 1,856
  • 4
  • 27
  • 56
5
votes
7 answers

SVN to Clearcase Export

I have a client who is rather insistent about using Clearcase. Are there any tools/scripts that would allow my team to work against an SVN repository (or really anything other than Clearcase), but periodically automatically sync back changesets to…
Kent Boogaart
  • 175,602
  • 35
  • 392
  • 393