Questions tagged [synchronize]
347 questions
379
votes
8 answers
Why use a ReentrantLock if one can use synchronized(this)?
I'm trying to understand what makes the lock in concurrency so important if one can use synchronized (this). In the dummy code below, I can do either:
synchronized the entire method or synchronize the vulnerable area (synchronized(this){...})
OR…

adhg
- 10,437
- 12
- 58
- 94
30
votes
8 answers
AJAX Autosave functionality
What's the best javascript library, or plugin or extension to a library, that has implemented autosaving functionality?
The specific need is to be able to 'save' a data grid. Think gmail and Google Documents' autosave.
I don't want to reinvent the…

antony.trupe
- 10,640
- 10
- 57
- 84
26
votes
3 answers
How can I ensure that an overridden method is synchronized
I have a class of common code that is thread safe.
One of the methods in that class is abstract and needs to be overridden for different implementations.
I need to ensure or at least flag to other developers that all implementations of this method…

ljbade
- 4,576
- 4
- 30
- 35
24
votes
4 answers
Database handling with 2 processes
I have a an application that has 2 parts.
A service which creates content.
An application that uses the content
Each of these run as different processes. The problem is that both of them share a database. And I frequently get database locked…

Codevalley
- 4,593
- 7
- 42
- 56
22
votes
3 answers
How to await an async call in JavaScript in a synchronous function?
I recently had to correct security issues in a web-application (that I didn't create).
The security problem was, it was using non-http-only cookies.
So I had to set the session-cookie http-only, which means you can't read (and set) the cookie's…

Stefan Steiger
- 78,642
- 66
- 377
- 442
22
votes
3 answers
CookieSyncManager is now deprecated, what can I use instead?
I'm using a cookie in my app which works fine in all browsers, but in android device the cookie is not setting as fast as I wanted, it takes some time until cookie is saved, same is happening when I delete the cookie. Is there anything I can do to…

Ioana Ab.
- 215
- 1
- 2
- 5
17
votes
3 answers
How to add Android-Project to GitHub
I'm using Android Studio to code my apps. Now I want to work on 2 PC's and thought about using a Cloud-Service. I decided to use GitHub, but I can't find a way to synchronize my GitHub account with my Android Studio project...
Can anyone explain…

Oliver
- 503
- 1
- 3
- 13
17
votes
1 answer
Ansible prompts password when using synchronize
I'm using ansible in the following way:
ansible-playbook -f 1 my-play-book.yaml --ask-pass --ask-sudo-pass
After this I'm asked to enter the ssh & sudo passwords (same password for both).
Inside my playbook file I'm using synchronize…

Mizh
- 361
- 2
- 11
15
votes
3 answers
Best way to synchronize cache data between two servers
Want to synchronize the cache data between two servers. Both database is sharing the same database, but for better execution data i have cached the data into Hash Map at startup.
Thus want to synchronize the cached data without restarting servers.…
user2310939
13
votes
2 answers
Does ruby have the Java equivalent of synchronize keyword?
Does ruby have the Java equivalent of synchronize keyword? I am using 1.9.1 and I don't quite see an elegant way to do this.

Zombies
- 25,039
- 43
- 140
- 225
11
votes
1 answer
When do I synchronize methods or use synchronized blocks in my methods in an Android game?
I'm looking into writing simple graphics code in Android and I've noticed some synchronized() blocks.
What is the reasoning behind this and how do I know when I should be "synchronizing" my code?

Alexander Trauzzi
- 7,277
- 13
- 68
- 112
11
votes
6 answers
Eclipse Git Synchronize does not display changes
No matter what I do, Eclipse (EGit) doesn't display the changes. I've searched a lot for this issue, but cannot solve it. A friend of mine has the same issue. In the past everything worked fine, but from one day to the other the issue occured.
When…

vRallev
- 4,982
- 3
- 31
- 34
10
votes
1 answer
Auto Sync on filesave Dreamweaver CS5
I've set up the remote server so clicking on the file will download it to my local folder. After I made some changes I have to click on synchronize with server etc.
Is there a way to synchronize with server when I simply save the file?
Thanks

Yan
- 582
- 2
- 6
- 22
10
votes
3 answers
How to synchronously call a set of functions in javascript
I am working on a javascript project that needs to get some data and process it, but I am having trouble with the asynchronous nature of JavaScript. What I want to be able to do is something like the following.
//The set of functions that I want to…

Nick P
- 347
- 1
- 4
- 13
9
votes
2 answers
Syntax for using lftp to synchronize local folder with an ftp folder?
I would like to synchronize two folders with each other. It should go two ways, always keeping the folders up to date (I use a regular cronjob). However, first I do not get the two way file transfer to work (it just downloads from the ftp and not…

Toby
- 135
- 1
- 1
- 8