Questions tagged [synchronous]

Synchronous means that the caller of a function waits for the response or completion of the function before returning control to the main program

Filter by
Sorted by
Tagged with
0 votes
1 answer
31 views

Synchronous MQ call using ibmmq and TypeScript

First off, I am a total noob at typescript and have some knowledge of mq plus the solution I am wanting to implement will be thrown out in a years time so a ‘good enough’ solution will do. What I want ...
Richard Peters's user avatar
1 vote
0 answers
33 views

Python Script to pull data from Synchronous API vs Asynchronous API

I'm new to scripting. Here is my question: We have an existing Python script to pull data from an asynchronous API.The source team had upgraded to an synchronous API.When I provide the new API version ...
learnto code's user avatar
0 votes
0 answers
4 views

Openthread network synchronisation

I'm in the process of setting up an OpenThread network of 20 nodes that need to be synchronised to within 200us for sophisticated power measurements. I'm using the EFR32xG24 Explorer Kit for this ...
LaughHub's user avatar
0 votes
0 answers
20 views

Provide both a synchronous and asynchronous API with promises

I'm creating a library where the consumer of the library should be able to go through different steps in the library, and the consumer should be able to decide when the library to go to the next step. ...
Peppe L-G's user avatar
  • 7,421
0 votes
0 answers
40 views

Three processes using Pipes is not running third process

I am working on a project for a computer architecture class, and I can't figure out why the third process in my C code is not running. I was given a skeleton code by the TA, and I went to an extra ...
Samantha Garcia's user avatar
0 votes
1 answer
26 views

Vscode-specific issue with node-xmlhttprequest-sync: crashes Extension host in Windows; error is caught in MacOS; works as expected in Linux

I am developing a vscode extension to wrap some functionality from an external API (ee in the examples below). Some of the functions in this external library can be called either synchronously: ...
Oliver Lopez's user avatar
-1 votes
0 answers
51 views

Swift and Synchronous URL loading issue [duplicate]

I hope someone could help me as I am a real newbie. Here is the code of a function I was using 4 years ago : func readStringFromURL(_ stringURL:String)-> String{ if let url = URL(string: ...
hgiraud's user avatar
  • 21
1 vote
1 answer
40 views

Use C++11 condition_varible to make 3 threads print 1-100 in turns. But the dead lock confuses me

I want to write a program use 3 threads to print 1-100 in turns using C++11 condition_variable, but dead lock confused me, here are my code: the tmp.cpp is: #include <condition_variable> #...
york king's user avatar
0 votes
0 answers
38 views

How to use the returned value of a javascript function for validation in another function [duplicate]

I have one function that's called onSubmit of a form and checks if the image I want to upload has the needed ratio. If the image has the ratio, it allows processing. Otherwither it wont. The problem ...
Lunar's user avatar
  • 57
0 votes
0 answers
35 views

How to interlace synchronous queues

I need to sequence the order in which some data is gathered (JSON) and subsequent calculations carried out. Everything works but not in the right order. I want to go from one queue to the next and ...
Edward Hasted's user avatar
-1 votes
1 answer
50 views

How can I read the file contents using http synchronously

In an event that is called synchronously, so I can't use await (so no IHttpClientFactory), what is the correct way to read the contents of a file. I am using the following, and it works. But the ...
David Thielen's user avatar
-2 votes
1 answer
82 views

Timer cancel() synchronization [duplicate]

I'm looking for a way to synchronize the cancel() method. The expected result is the first() method is guaranteed to be called first. timer = new Timer(); timer.schedule(new TimerTask() { @...
Tarik's user avatar
  • 1
2 votes
1 answer
78 views

is it necessary to call pthread_mutex_destroy both in parent and child process

here is the code: struct mt { pthread_mutex_t mutex; pthread_mutexattr_t mutexattr; }; int main(void) { struct mt *mm; pid_t pid; int fd = open("my_name", O_CREAT | ...
sunhang's user avatar
  • 387
0 votes
1 answer
35 views

Are there Synchronous Standard Step Functions Workflows

Are there Synchronous Standard Step Functions Workflows? Or Synchronous Workflows are only for express step-functions?
YulePale's user avatar
  • 6,944
1 vote
2 answers
349 views

How do I call a Swift async method from within a synchronous method that has a return value and completion handlers can't be used?

I've been given an Objective-C framework that has the following API (simplified for this question): @protocol SomeClassDelegate; NS_REFINED_FOR_SWIFT @interface SomeClass: NSObject @property (weak) ...
HangarRash's user avatar
  • 10.8k
0 votes
0 answers
33 views

Azure queue binding to Azure function to process message synchronously

What is the ideal method to design a synchronous queue for an Azure function to prevent parallel processing? The function would execute the next queue request after the current one is finished. Thanks,...
Saurabh's user avatar
  • 5,659
-1 votes
1 answer
110 views

Async and await are not giving the expected response in C# [duplicate]

Suppose I am giving some tasks in the main method public static void Main(string[] args) { // Synchronous methods Task1(); Task2(); Task3(); Task4(); // Asynchronous methods ...
Showyeab Ahmed's user avatar
0 votes
0 answers
7 views

openStdin() vs process.stdin.on('data' ,()=> {})

what is the difference , as there are so many way to take input and easy to make a begineer bite the dust what i notice both of these below 1 and 2 is asynchronous by nature they dont wait for next ...
Avik Biswas's user avatar
0 votes
1 answer
94 views

Why is ASGI labeled as "asynchronous" and WSGI as "synchronous"

I was researching this stuff for the first time and found the terminology to be confusing. A WSGI server handles one request at a time, and yet it is labeled as "synchronous" which means &...
Arjun Ajesh's user avatar
0 votes
2 answers
72 views

Write blocking javascript [duplicate]

I have a tiny server I'm trying to fetch a bunch of files from; ~100 to fetch. I'm using JS to fetch the files using a forEach loop. Unfortunately, the ~100 requests knocks over the server. links....
icicleking's user avatar
  • 1,049
0 votes
1 answer
184 views

verilog occur the error of "expecting a statement [9(IEEE)]" [duplicate]

Recently I am doing verilog program about FSM. Two sequences of positive integers will be sequentially loaded into the circuit, one pair of integers per cycle. The length of a sequence (the number of ...
游凱安's user avatar
3 votes
1 answer
92 views

Shouldn't an exception inside Promise() constructor stop the rest of the script?

I'm studying the Promise() constructor, and I noticed something unexpected for my me. console.log('first'); const promise1 = new Promise((resolve, reject) => { console.log('inside executor'); ...
gus's user avatar
  • 132
0 votes
0 answers
43 views

PostgreSQL synchronous stored procedure execution calls from Django Backend

We have 5 PostgreSQL stored procedures and we need them to be chronologically executed in order. We have them listed in one stored procedure: CREATE PROCEDURE main(input_file_path varchar) LANGUAGE '...
SDido's user avatar
  • 17
0 votes
0 answers
30 views

How to calculate the number of instructions that a microcontroller can execute before a specified event

I am trying to understand this exercise about PIC32 microcontroller. I have a SPI peripheral module which can operate with a peripheral clock as fast as 50 MHz and it is connected to Serial EEPROMs ...
Filippo_Col's user avatar
2 votes
1 answer
201 views

python's asyncio exchange data between 2 coroutines - one of them executing synchronous and cpu-intensive code

I have problems getting 2 routines cooperating, now even to the point that I've started asking myself if it's possible to do it with asyncio... I have 2 routines. The first routine performs (only) ...
sudo's user avatar
  • 198
0 votes
0 answers
73 views

Synchronous code blocking in Node.js working with complex operations

I have a Node.js application that processes a large amount of data. It seems to block other tasks while it's working, leading to slow performance. How can I improve the performance of my Node.js app ...
Ahmed Nefzaoui's user avatar
1 vote
0 answers
92 views

fluentd exec_filter output fails to recover after OOM

I'm using fluentd in docker (alpine image) to collect messages from gelf input. Running it using docker-compose. In the output, I need to send the messages to a 3rd party using a python SDK, and I ...
Ofek Agmon's user avatar
  • 5,130
0 votes
0 answers
122 views

Why am I getting android.os.NetworkOnMainThreadException on a OkHttpClient() response call for a syncronous call?

I'm using OkHttpClient() to create a synchronous connection with a Web server, as per the documentation: Heading private void sendGetRequest(String url) throws IOException { OkHttpClient client = ...
FractalBob's user avatar
  • 3,325
0 votes
0 answers
24 views

jQuery $.each() Acting Asynchronously? [duplicate]

My jQuery function is acting funny and I can't for the life of me figure out why? function getValueFromSettingArray(array,key){ if(array && array.length > 0){ console.log("...
jjonesdesign's user avatar
0 votes
0 answers
13 views

does Express respond to calls synchronously? [duplicate]

Let's say that I have a small REST API made with Express, and on average it takes 2 seconds to respond to each call. If I make 2 petitions at the same time, will one petition be answered, and then the ...
Jorge's user avatar
  • 3
0 votes
2 answers
235 views

Why it's called Synchronous while it means Asynchronous | Javascript

I'm not an English native speaker. The word synchronous and asynchronous have always been confusing to me while I learn about them in coding. Linguistically, synchronous means: existing or occurring ...
Sumaya A.'s user avatar
0 votes
1 answer
46 views

Iterate through postgres results and synchronously execute function on value

I have a pg object being returned with URLs. I need to parse the URLs and synchronously execute a function on each URL. The function can take upwards of 2-3 minutes to execute since it is running a ...
Gerg's user avatar
  • 68
0 votes
0 answers
680 views

How to queue multiple requests in ASP.NET Core 6 Web API

Description: queue the multiple requests for ASP.NET Core 6 Web API. There are multiple terminals/clients pc to call Web API which triggered the code which is responsible for printing to execute and ...
StarX's user avatar
  • 11
4 votes
0 answers
3k views

FastAPI with request queue

I have developed an application that takes an image and does some hard work on the GPU. The problem is that if a request is currently being processed (processing some image on the GPU) and another ...
padu's user avatar
  • 729
-3 votes
1 answer
52 views

Why code below a loop is executing while loop is not over yet? [closed]

I am trying to generate random n(value of n to be provided manually) primes so that I can see the lag in browser, as this is a long synchronous process. But when I am running the code below I am ...
Rambabu Patidar's user avatar
0 votes
0 answers
69 views

Better c# HTTP Synchronous calls and timer logic

I am building a c# application (.NET Core 6), calling a Trading Exchange API(WCF) using an HttpClient. They have a strict policy of not invoking their APIs asynchronously and they monitor this as well....
beast's user avatar
  • 107
0 votes
0 answers
33 views

Node.js Waiting for data to return before module.exports

I have a module that queries a database using a pool. The pool is created in a different module. db.js const dbPool = require('./pool.js'); dbPool.query(...); pool.js const getPWrd = () => { ...
Jelly Donut's user avatar
0 votes
0 answers
29 views

Synchronous Message Handling in NServiceBus

I have a use case where I want to publish events where some of the event handlers need to be synchronous (potentially running on the same box as the publisher). Is this possible with using NServiceBus?...
geeko's user avatar
  • 2,720
0 votes
0 answers
96 views

Enable Sequential kafka Asynchronous send() message for 2 kafka producers configured in 2 regions

Scenario : Two kafka producer configured with different bootstrap servers (different regions), we are trying to send message to primary cluster first and if primary cluster is down ( due to timeout ...
Abhishek's user avatar
0 votes
0 answers
43 views

How to interrupt/abort a 3rd party synchronous script using JavaScript

I have a 3rd party script that must remain synchronous, but I'm looking for a way to abort out of it and continue rendering the rest of the page if it takes too long to run. I've explored using ...
Tom Hayton's user avatar
1 vote
0 answers
118 views

GRPC synchronous request error: call to deleted constructor

I am trying to configure a grpc::ClientContext as part of a syncrhonous request using GRPC. Note, without the context 'stuff' all is working fine. My function looks like this: grpc::Status Connection::...
amlwwalker's user avatar
  • 3,171
0 votes
1 answer
62 views

update query in promise not running

please help, the update query isn't running in my promise. It just skips to the last statement "done with six". The row that it's meant to update in the database table doesn't get updated. ...
sb_thedev's user avatar
1 vote
1 answer
243 views

How to code a synchronous wrapper for jquery ajax functions [duplicate]

I'm converting synchronous ajax calls to asynchronous because synchronous calls are no longer supported in most browsers. Since my code is filled with synchronous (and dynamic) ajax calls (to client-...
Ken Paul's user avatar
  • 5,695
1 vote
3 answers
182 views

How to achieve synch. call from RabbitMQ in .NET Core microservice Architecture?

In my project there is a need of inter-service communication in synchronize manner. Is there anyway we can communicate between two microservice in synchronize manner using RabbitMQ or any other async ...
Sudhanshu Trivedi's user avatar
0 votes
0 answers
115 views

How can I avoid the following race condition using condition variables?

I have a recipe of several steps where each steps may or may not control a motor. For this, I created a thread that sends a command to the motor. I used to join that thread, as each steps needed to ...
asdfasdf's user avatar
  • 774
-1 votes
1 answer
51 views

Can't scroll on Javascript with synchronous sleep

I'am writting a code to scroll down with synchronous pauses between scrolls. To achieve synchronous sleep I am using the classic Javascript approach using a While loop with a timer. Here's where it ...
Lawless Leopard's user avatar
0 votes
1 answer
102 views

Implementation HTTP synchronous request response

I am working on containerization application where a front-end application calls HTTP request to API gateway. The request data received at API Gateway is forward to Micro service via Kafka. But I have ...
Malik Rashid Ahmad's user avatar
1 vote
0 answers
68 views

How to mix asynchronous request handling with synchronous in microservice architecture

I have an API gateway that interacts with services. At the moment, the gateway accepts HTTP requests from various external servers, calls a certain service, waits for processing (for example, ...
user246708's user avatar
0 votes
1 answer
103 views

How to trap signals in long-running synchronous loop using Node.js

I have a simple scenario of: process.on("SIGINT", s => { console.log('trapped sigint:', s); signals.INT = true; }); let i = 0; while(true){ if(signals.INT){ console....
Alexander Mills's user avatar
1 vote
0 answers
129 views

is Sql.execute() synchronous or asynchronous with groovy?

I stumbled onto a bit of groovy code deleting rows from a database by batches of a given size: for (int index = 0; index <= loopCnt; index++) { sql.execute("DELETE TOP(" + ...
user15076895's user avatar

1
2 3 4 5
33