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).
12,571
questions
-1
votes
0
answers
16
views
How to make an async Swift function "@synchronized"?
I'd like to create an async function which itself using async calls. I also want to ensure that only one call is actively processed in any moment. So I want an async @synchronized function.
How to do ...
0
votes
0
answers
13
views
C# What is sync block index (overhead member of all reference types)
As far as I understand they are mainly used for thread synchronization. For example, when we use "lock" or "Monitor" for blocking other threads, something happens to sync block ...
-1
votes
0
answers
15
views
Automatically copy files from local to web app [closed]
I have an application developed with Laravel and VueJs for file sharing. I want to create a Windows script that will automatically copy files from my computer to VueJS File Manager.
For example: I ...
0
votes
0
answers
21
views
Reader-Writer problem but each writer has his own book
The problem is a modified version of the readers-writer sync algorithm. Where There are 2 writers, each has his own book but the readers can access any of the two books if there are not being used by ...
0
votes
1
answer
60
views
Thread synchronizing - almost same expressions but different result
public class MythreadM {
public static void main(String[] args) {
// TODO Auto-generated method stub
Msg m = new Msg();
Mythread thread1 = new Mythread(m);
...
0
votes
0
answers
39
views
Processes synchronization using signals in c
I`m writing the program in which parent and child processes synchronize their actions with signals.
So, as result, I need a repeated cycle:
The parent process should send signal SIGUSR1 to a group of ...
0
votes
0
answers
16
views
In Flutter how to sync app data with google drive
I am using sqflite local db. i want to sync the data with the google drive. i have created a hidden app data folder in google drive and successfully uploaded data to that folder also able to retrieve ...
0
votes
0
answers
23
views
Synchronization across different WebFlux endpoints in the same JVM
Update - we are testing a solution. It involves merging multiple sinks at startup and then signaling between separate fluxes chains
At Startup:
each controller creates a sink to be shared by all its ...
0
votes
0
answers
7
views
Centos 7 additive synchronous backup
I would need to backup tree-lined directories containing files instantly. The need would be to make it additive only (without overwriting or deleting files from the backup directory. For example, if a ...
0
votes
0
answers
16
views
Force android Gmail sync in background
The Gmail app on my phone is not syncing email anymore unless it is opened in foreground.
(This is a known issue on several OnePlus devices after the Android 11 upgrade).
Is there any activity or ...
0
votes
0
answers
18
views
Github: how to sync old fork (including all tags) from original projects?
Github: how to sync old fork (including all tags) from original project?
I did pull all from upstream on Github website. but no new tags are included.
original project: user1/project1
forked 5 years ...
-1
votes
0
answers
34
views
What are good ways to keep Staging data (slave) synced with Prod data (master)
So to begin with, I'll first explain quickly how our application work.
We have 2 main parts in our app:
first part is a client requests manager, let's call it's DB schema "requests",
second ...
3
votes
1
answer
51
views
Does std::mutex enforce cache cohesion?
I have a non-atomic variable my_var and an std::mutex my_mut. I assume up to this point in the code, the programmer has followed this rule:
Each time the programmer modifies or writes to my_var, he ...
0
votes
0
answers
19
views
How do I synchronize access to variables in compute shader?
So i seem to be having an issue with assigning a value to a buffer within a compute shader.
Essentially, I want to check if a calculated value is greater than one of the values of my structured buffer,...
-2
votes
0
answers
16
views
How to sync remote data from local database in Microsoft SQL Server [closed]
I am trying to sync two databases; when any change occurs in the local database with the online database to solve this kindly share the easiest method to solve this problem
0
votes
1
answer
14
views
Can i replace an existing normal table with a materialized view
I've searched but found no answer, so i resort to you.
I have an Oracle table, say "Countries" that exists for ages in database 2 (target).
Now, we want to synchronize that table from a &...
1
vote
1
answer
61
views
Visible order of operations with acquire/release fence in C++
I have a following program which uses std::atomic_thread_fences:
int data1 = 0;
std::atomic<int> data2 = 0;
std::atomic<int> state;
int main() {
state.store(0);
data1 = 0;
...
1
vote
1
answer
26
views
Do __shfl_xx_sync() intrinsics with mask need an additional __syncwarp()?
Do __shfl_xx_sync() instructions, where only some lanes participate, need an additional __syncwarp() instruction, or is setting a mask enough?
I cannot provide a working minimal example, as it is very ...
-1
votes
0
answers
36
views
Syncing two specific ranges in 3 tabs for google sheets
Is there a way to two way sync where you can edit and delete from either tab in google sheets?
I've found several solutions that almost works but falls short like this :
syncing columns and
syncing ...
0
votes
0
answers
12
views
chrome.storage.sync.get external variable not visible in function
i have this simple code for my chrome extension:
ar = ["a", "e", "i"];
for (k=0; k<2; k++) {
var ids= ar[k];
chrome.storage.sync.get('info_Email'...
2
votes
0
answers
48
views
More precise sleep (usleep) in Python?
I'm trying to implement real-time plotting in Python, with samples being around 500-1000 microseconds apart. Using time.sleep() between drawing each sample doesn't work due to reasons mentioned here: ...
4
votes
1
answer
105
views
Using optimistic locks in C++ and memory order
I'm wondering how 'optimistic locks' (as described e.g. here: https://db.in.tum.de/~leis/papers/artsync.pdf) can be used in C++ with regard to non-atomic data and what memory orders should be used.
My ...
-1
votes
0
answers
12
views
How to sync redux store across all tabs with redux thunk and persist
since I am new to redux. how will I sync my redux store so that a
change in one tab is reflected in all other tabs store. I am using
redux Thunk and persist currently
0
votes
0
answers
4
views
What or how can I use something to copy files between hard drives
What or how can I check if file exist if modified from original copy to this folder in an external hard drive, ie. I want to copy but just the modified version of a GTA V with mods, but I don't have ...
0
votes
0
answers
22
views
Synchronise two databases , everytime something changes in DB A , it changes in DB B and vice versa
I have a database A, I am planning on getting a server in a foreign country and have a similar database to A called B. Everytime something changes (tables , data) in database A, it should also change ...
0
votes
0
answers
18
views
What's the proper file format for local data to implement a sync feature with a SQL database server?
This question might be quite dumb, but I couldn't find anything related.
Let's say a user can create and modify a shopping list in an application, that data would be synchronized to the SQL server ...
1
vote
0
answers
73
views
Single use condition_variable
Consider this simple synchronization problem. I have two threads, A and B, that each execute 2 steps. I want step 1a to be performed before step 2b.
Thread A
Thread B
Step 1a
Step 1b
Step 2a
Step ...
-1
votes
0
answers
6
views
Creating an App that syncs between devices by using a cloud storage provider
Let's say I want to create a flashcard Windows desktop app and an Android flashcard app. Let's say I have a low or no budget for a server for the users to sync the flashcards between the devices. How ...
0
votes
2
answers
14
views
IE11 wait promise result
How can I wait for promise/script.onload to execute without: .then(), .catch(), await/async and callback IE11. Something comparable to the Sleep(100) on cpp. If I do a loop 'while(loadFlag == false);' ...
0
votes
1
answer
67
views
Does std::atomic<> gurantee that store() operation is propagated immediately (almost) to other threads with load()?
I have std::atomic<T> atomic_value; (for type T being bool, int32_t, int64_t and any other). If 1st thread does
atomic_value.store(value, std::memory_order_relaxed);
and in 2nd thread at some ...
2
votes
1
answer
96
views
Comparing latency of mutex vs. spinlock wake time
I am curious about the latency of a mutex vs. spinlock, measured as the time between when one thread unlocks it and another waiting thread can access it. I wrote two tests in C++ and see ~15000 ...
-1
votes
0
answers
9
views
Unable to execute Synchronization Manager for mobsync.exe
I'm trying to execute a registry dump on Windows to show the programs executed on bootup along with any entries that could've been added.
I was told to run the command below for the registry to be ...
0
votes
1
answer
23
views
Runnable inside synchronized (this) leads to app crash
My code is:
@Override
public void loadingDone(int whatIsDone) {
if (interrupt) {
return;
}
synchronized (this) {
// 1 - loaded with visu
// 2 - loaded without visu
...
0
votes
0
answers
11
views
What happens about synchronization and endorsement policies when an organization exits a collectioncollection?
We want to use collections to manage data sharing between our organizations, but we're confused about how we can scale-out or scale-in when collections are established if some organizations want exit ...
0
votes
0
answers
42
views
Failed to resolve com.theartofdev.edmodo
I have been trying to sync my project but each time i try to do it is gives these warning message below
Failed to resolve: com.theartofdev.edmodo:android-image-cropper:2.8.0
Failed to resolve: com....
0
votes
2
answers
60
views
Camunda: Receive multiple, different messages at once
I am currently developing a kinda complex workflow with camunda. The goal of this workflow is to orchestrate the execution of different external business processes. Which includes start, overwatch and ...
0
votes
1
answer
23
views
LDAP Change/Synchronize Time in Linux
Beginner system admin here. We have a Linux server and multiple users running in LDAP (2.4.31)
Is there a way to synchronize the local date/time with all of the users? Because some CMOS batteries are ...
-1
votes
0
answers
8
views
Google is not syncing passwords
My google account is not syncing passwords across devices. I have tried all the solutions given on Google help etc. As a test, I created an account on a website through my phone. Now when I log in ...
0
votes
0
answers
6
views
Sync in memory state between master a d slave in a cluster
To simplify my situation, here is what it looks like.
Assume I have large number of servers, each server can be on or off. I have a cluster of two nodes in active/passive setup. The active node ...
0
votes
0
answers
24
views
How to execute the Junit-5 tests based on dynamic dependency conditions or tests
I am trying to run the Junit5 tests and achieve something like this:
I have 10 tests combined from different classes, and running parallelly with CUNCURRENT execution mode. Everything looks good till ...
0
votes
1
answer
36
views
Making Consumer/Producer Problem a bit Advanced
Is there any way for the Consumer/Producer problem in synchronization could be made more advanced by introducing some scenario or making it a little bit more complex.
The reason I am asking this is ...
0
votes
1
answer
24
views
How do I send data to server by loop without sync problem?
I have an array of products in typescript (in angular) and I need to update their prices in the database via http calls.
I insert them in such a way:
array.foreach(element=>{
this.product.price=...
0
votes
1
answer
31
views
sync fetch eloquent laravel
i have this array:
$ingredients_alergens = [
1285 => [ //id from ingredient
4, //id from alergen
2
]
1286 => [
6
]
1287 => [
1
]
1288 =&...
1
vote
0
answers
27
views
Does MWAIT make the process do REP NOP or context switch immediately?
Does calling MWAIT make the process to do REP NOP (= keep using its hardware thread, not evicted, but use less power by not issuing the uOPs to the processor backend) until its scheduled time is over?
...
-1
votes
0
answers
16
views
Synchronization between browsers
i’m kinda new here. I am using firefox on my laptop and mobile device right now. I bought a new tablet today. But i don’t want to use firefox in my tablet because Firefox ui is so bad. i want to use ...
0
votes
0
answers
17
views
Fetching the contents of two arrays asynchronously after one another
Say I have two arrays of URLs, arr1 and arr2.
I need to fetch arr1[0] then arr1[1], arr1[2] etc. in a synchronized manner one after another (and only after the previous URL has been resolved).
Once ...
0
votes
0
answers
15
views
How to synchronously sample two systems using python
I need to acquire samples from two systems:
Video capturer (for example, OpenCV)
Electromagnetic tracking system.
The samples must be synchronized, the sampling time must be as stable as possible, ...
2
votes
0
answers
38
views
Wrapping RwLock<T> in rust c++ interface?
When trying to design a UI engine in rust and exposing api to c++ logic, my current thinking would be separating the dom and program logic via a binding mechanism.
Pseudo code:
// in c style, but ...
-1
votes
0
answers
10
views
macOS - Sync ~/Desktop folder across multiple devices via iCloud
I am using multiple macOS computers (stationary, laptop) and want my desktop to be in sync across devices.
Currently, I use the following hack. I rename the local desktop folder and then create a ...
0
votes
1
answer
20
views
How to properly synchronise a transaction?
What is a proper synchronisation in the following situation?
public class Product {
private int amountAvailable;
private User seller;
public int subtractFromAmountAvailable(int amount) {...