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,460
questions
1
vote
1
answer
54
views
Implementing readers-writer lock in boost.asio with writer prioritization
My application handle 3 types of tasks that are originated by either async external source (User press button), or internally (timeout expires, ongoing task trigger another tasks, network event, etc).
...
0
votes
0
answers
26
views
How to sync tables in different databases using Percona Toolkit, but only inserts
I have two databases, one large (test2) and one small (test1), and they have course tables. I want to synchronize them, but so that only inserts work on the tables. Update and delete did not work ...
1
vote
0
answers
14
views
Vue3 component does not call onMounted hook
Project is Vue3 + Typescript + composition api. I have pretty simple component which contains onMounted() hook which should set up some properties after data change. Parent component make API request ...
0
votes
1
answer
46
views
Server-Clients model using shared memory
I have the following program and can't make it to proper synchronization between clients and server.
After running , my program always ends up in collision between a client and a server trying to ...
0
votes
0
answers
9
views
Sync enviroments JPA
I would like to know how can I Sync beta enviromet with the values of the Production DB. All the database is modeled with JPA and I want to "move" the values from the prod DB to beta
I have ...
0
votes
2
answers
32
views
Dart: Explain SynchronousStreamController with an example
I have gone through the doc of SynchronousStreamController manytimes.
I know that it delivers its events synchronously; events are fired immediately to the stream instead of adding to a later micro-...
0
votes
0
answers
34
views
Audio and Video File arent playing in sync
I'm creating a Karaoke WebApp in React for some friends of mine and me.
In my Karaoke App, i'm using multiple Media Files, at least two per song:
One MP4 File which contains the video and the ...
1
vote
0
answers
13
views
File Based Locking vs In-Memory Locking
So I know what locks are and how they are used. I was messing around with Lucene and noticed that it uses a file (.e.g. write.lock) rather than an in-memory object to synchronize the multiple threads ...
1
vote
1
answer
33
views
Successive compute kernels in vulkan
I have three compute kernels that have to run in succession, synchronized so that the previous kernel finishes before the next kernel starts.
This is because a previous kernel writes a buffer that is ...
1
vote
0
answers
12
views
Syncing SharePoint 2013 to File Explorer when using Microsoft 365 Apps for Enterprise and not Microsoft Office professional
I am an IT Intern tasked with designing an online SharePoint 2013 filing platform to replace local shared drive.
I have created the different department sites and currently awaiting migration. While ...
-1
votes
0
answers
39
views
how to solve thread synchronization problem in c++ [closed]
I need to know if two threads are working on same function, is there any way for thread1 to know if any other thread(thread2) has already entered the function? if yes in that case i just want thread1 ...
2
votes
1
answer
32
views
Task prioritization when yielding from spawn method running on strand executor
I'd like to analyze the ordering of boost.asio calls using strand.
Consider the following scenario. First, a coroutine that uses the strand is called by boost::asio::spawn (task 1), it's running ...
0
votes
1
answer
13
views
Laravel 8 syncWithPivotValues() do not work as expected
I have three tables: audiences, companies and audience_company. Pivot table audience_company contains columns audience_id, company_id and type. So I differentiate data according type column. There is ...
0
votes
1
answer
69
views
In C++, will a copy of mutex protected data be optimized away?
In C++, will a copy of mutex-protected data be optimized away?
I'd like to make a snapshot of the protected data, and read thru it outside of the mutex. Would this copy get optimized away though, ...
1
vote
2
answers
83
views
In C++, to use the built-in mutexes, do I also need to use the built-in threads?
In C++, to use the built-in mutexes, do I also need to use the built-in threads (as opposed to managing threads directly via OS calls)?
I haven't tried anything yet, as I'm not sure if all problems ...
0
votes
0
answers
30
views
Sync data between instances using binary data
I sporadically sync data from a small set of tables in production. I cannot access the production machine directly, so historically
I submit "select * from dbo.source",
DBA copies from ...
1
vote
2
answers
76
views
Can std::optional::has_value() be made thread safe without an additional atomic_bool by using atomic_thread_fence?
I have an optional<T> that is populated exactly once, by a single thread “eventually” - after it does some calculation, IO, etc. There are many readers that call has_value() and if true, process ...
2
votes
1
answer
55
views
Setting condition variable monitor flag without a lock, is it valid?
The following code uses condition variable and a monitor flag to synchronize an operation between the main thread and thread2:
int main() {
std::mutex m;
std::condition_variable cv;
std::...
0
votes
0
answers
23
views
How do I make it asynchronous?
@Configuration
public class RedisConfig {
@Value("${spring.redis.session.host}")
private String hostName;
@Value("${spring.redis.session.port}")
private int port;
...
0
votes
1
answer
92
views
How to make threads execute in the order they are created in Java
I am using a niche database. It currently does not support the export of sql files in terms of data backup, only dump files, but the demand needs to export sql files, so I can only query them by ...
-1
votes
0
answers
8
views
What Causes MS Sync Framework 2.1 to think a record was deleted?
I've got multiple clients that needed disconnected SQL Server databases (unreliable internet) that synchronise frequently so I implemented the sync framework. It has been mostly reliable over the last ...
0
votes
0
answers
8
views
Web Automation and API synchronization problem?
I have this automation task I'm planning to work on using Python but I'm not sure on how to go about it.
I need to get data (dataframe) from a webpage which is done via exporting of the data. but now, ...
0
votes
0
answers
13
views
How to do bidirectional synchronization between multiple Redis severs
I am using multiple Redis servers , here one is master server and other one are replicas server. Suppose I wanna write something in master server then the changes will be reflected on replicas by ...
-1
votes
1
answer
19
views
In Flutter, how to force AWS Datastore to get data from cloud instead of from local
Before I build an admin panel for my app, sometimes I have to update data from the backend using Amplify Studio. When I do this, the only way I can get the update data to show up locally in my app is ...
1
vote
2
answers
83
views
Synchronization a function in multithreading C using a shared variable
Trying to synchronize calling a function but in a high performance way, using just global variable
I'm trying to synchronize calling a function foo by this way:
bool global_var=0;
void* task(void*) {
...
-1
votes
1
answer
19
views
Android Kotlin synchronized and FileInputStream.read causes thread starvation warning
I would like to prevent reads and writes from occuring at the same time by using 'synchronized'. However, that causes a warning: Possibly blocking call in non-blocking context could lead to thread ...
0
votes
1
answer
35
views
Is it possible to place an OU under a non-OU at Active Directory
I want to search all OU in the AD with LDAP for sync,I have encountered an issue.
example:
-[OU] officeA
--[OU] officeA2
--[OU] officeA3
-[OU] officeB
--[G] ZXC
---[OU] officeB3
[G] ZXC just random ...
0
votes
1
answer
38
views
Specific Order Of Execution for processes using fork and waitpid()
I want to create 4 child processes from a parent process, using the fork() system call. Then I want to print some output from the processes (including their PID), in this certain order:
P4, P1, P3, P2,...
0
votes
0
answers
41
views
Use MultiplayerSynchronizer via a script Godot 4
here I would like to know if it is possible to use the MultiplayerSynchronizer node via a script because I make instances of scenes and I would then like to synchronize these instances, If it is ...
1
vote
0
answers
39
views
Daisy-chaining Semaphore/SemaphoreSlim calls?
Let's suppose I have an operation that uses a resource protected by a quota (reqs/s). Think for example any rate-limited Cloud service:
public class ExternalService
{
public async ValueTask ...
0
votes
2
answers
37
views
Optimizing Memory-Intensive Parallel Processing in Python 3.x
I've been working on a project involving memory-intensive parallel processing in Python 3.x, utilizing the multiprocessing module. The task at hand requires processing a large dataset that doesn't fit ...
0
votes
1
answer
25
views
How can do I make JavaScript Synchronous while using Async/Await? [duplicate]
I need to sequentially iterate through an array of URLs, awaiting asynchronous responses for each, before moving to the next URL.
I was initially expecting this to be synchronous. (I also tried .map ...
0
votes
0
answers
8
views
Having to commit all files through GitHub Desktop every time on each computer
I have been using GitHub desktop on my computer at work, in which the repositories are saved in a OneDrive folder.
I recently bought a new laptop and all my repositories are already available through ...
0
votes
0
answers
22
views
How to force the reconnection with MongoDB when I lose and recover the internet connection
The problem I'm having is that when I lose internet connection and get it back, it takes too long to reconnect, so I used Session.pause() and Session.resume() to force a reconnection. The problem is ...
0
votes
1
answer
28
views
Series in this sync have already been synced to Codex by another time series sync
I have created an object set titled "Temperature Measurements" using "Temperature Metadata" as the backing dataset and "Temperature_Timeseries_sync" as the time series ...
1
vote
1
answer
32
views
JavaDoc for AbstractQueuedSynchronizer is unclear
Two sentences in the JavaDoc for AbstractQueuedSynchronizer are in my opinion unclear/misleading, and therefore I would like to clarify such issues.
The first sentence states:
Even though this class ...
0
votes
0
answers
25
views
Session Storage in Redis
I have developed a chat application using Java and the Spring framework. The WEBSOCKET_MAP is a ConcurrentHashMap used to store Server objects for all users. It helps track all connected users to the ...
0
votes
0
answers
21
views
Syncing in Unity Mirror
I am a noob in programming and a complete noob in mirror. And here's my question.
I want that when pressed by any player, an item is added to the chest that is visible to all players and all the ...
0
votes
1
answer
17
views
How is synchorization issue being handled in this file?
I am considering using Gson for my project. While reviewing its features, a question arose regarding its concurrency handling.
How does Gson handle potential concurrency issues in its implementation? ...
0
votes
2
answers
31
views
System.ObjectDisposedException: 'Cannot access a disposed context instance
i got this error in my project
System.ObjectDisposedException: 'Cannot access a disposed context instance. A common cause of this error is disposing a context instance that was resolved from ...
0
votes
2
answers
60
views
Non-deterministic read values when using std::atomic store/load with std::memory_order_seq_cst
I started learning about memory orderings in C++ using std::atomic, I'm trying to understand the synchronization mechanism between a successive store and load of an atomic variable from two different ...
0
votes
0
answers
23
views
How do I approach syncing a directory of files between clients?
I'm building an application that works with a directory of files on the user's computer. I'm planning to implement a separate package that acts as a sync server. The client can register itself with ...
0
votes
1
answer
47
views
Is synchronization needed when sharing a List<T> inside of a method in Parallel.ForEach?
I just saw following code snippet:
public List<string> ProcessText(List<student> students)
{
List<student> result = new();
Parallel.ForEach(students, (st) =>
{
...
0
votes
0
answers
26
views
Schema validation failed: property ‘MatchFormSettingsSchema.questionsArray’ of type ‘array’ has unknown object type ‘Question’
I'm trying to setup sync with a new Schema called MatchFormSettingsSchema. This is the code for that schema:
@RealmModel()
class _MatchFormSettingsSchema {
@PrimaryKey()
@MapTo('_id')
late ...
0
votes
1
answer
38
views
Go Memory Model: How to assign values to a field with proper synchronization
Below is the core portion of my implementation for Promise in Go.
// A promise represents the future result of a call to a function.
type promise struct {
// state is the current state of this ...
0
votes
2
answers
89
views
ansible rsync with sudo passworded on remote host
Im trying to use synchronize with ansible and it uses rsync.
I have this task :
- name: Synchronization of src on the control machine to dest on the remote hosts become: yes ansible.posix....
0
votes
0
answers
8
views
How to address a Gradle sync failure with buttons and a sync issue related to a lock file?
Gradle project sync failed. Buttons: Try Again, Open 'Build' View, Show Log. Sync issue: Couldn't create parent directory for lock file
I tried to solve the given above problem but I can't. Please ...
0
votes
0
answers
16
views
Power Bi : sync slicers in 2 reports stored in the same workspace
I'd like to split a big report Power Bi in several reports stored in the same workspace and published in a Power Bi App.
Why splitting ?
The report display a lot of indicators.
The structure is "...
0
votes
0
answers
25
views
Why is the lock on synchronized block not working? [duplicate]
I wrote a SharedObject class which has two methods to increment a variable. The expected result is 200000 but it shows much less than that. I thought the synchronized block will acquire lock on the ...
0
votes
0
answers
10
views
ecg raw signal realtime filtering and removing baseline wander
I am currently trying to achieve stimuli synchronization to cardiac systole and diastole.
I have BIOPAC MP45 (education version) and BHAPI.
I've succeeded in getting the realtime signal from MP45 ...