Skip to main content

Questions tagged [asynchronous]

Asynchronous programming is a strategy for deferring operations with high latency or low priority, usually in an attempt to improve performance, responsiveness, and / or composability of software. Such strategies are usually employed using some combination of event-driven programming and callbacks, and optionally making use of concurrency through coroutines and / or threads.

asynchronous
0 votes
0 answers
4 views

Scaling out a Asynchronous SageMaker Endpoint

I've deployed a Asynchronous SageMaker Endpoint and I want it to scale out (to 0 instances) when nothing is requested for a period of times and to scale in when something is requested (to <=1 ...
Francesco Camussoni's user avatar
0 votes
1 answer
25 views

Swift async/await implement refresh using a task

I have a scenario where the user can try to refresh the app from multiple places, but I just want to refresh one time per request. Just wanted to know if something like this could work, every time ...
David Gonçaalves's user avatar
0 votes
0 answers
7 views

Handling Asynchronous Keycloak Authentication in React

I'm integrating Keycloak into my React application using the @react-keycloak/web library. I have a PrivateRoute component that should restrict access based on user roles and authentication status. ...
ayoub_benayyad's user avatar
0 votes
0 answers
16 views

Python: Post Many Audio Files and Get the Results

Python I have thousands of audio files on my local computer and I run an API with FastAPI that extracts features from audio files and sends these features back to me (json). The procedure is as ...
Tütü's user avatar
  • 3
0 votes
0 answers
29 views

Asynchronous CPU-Bounded task PYTHON

I have a class "FXvolatility" which can interpolate some value based on two inputs (float, datetime) via this following method: async def interpolate_volatility_async(self, udl:str, expiry:...
Arbitrageously's user avatar
0 votes
0 answers
10 views

How to Immediately Cancel an Asyncio Task That uses the Ollama Python Library to generate an answer?

I'm using ollama to generate answers from large language models (LLMs) with ollama python api. I want to cancel the response generation by clicking the stop button. The problem is that the task ...
noocoder777's user avatar
0 votes
0 answers
13 views

Book Appointment FSL

I currently have a custom code using the standard class AppointmentBookingSlot Class. When an API get call is made for a specific appointment, the class is called to return the slots "slots = FSL....
Jena Moon's user avatar
0 votes
1 answer
60 views

Cannot pass function of type '(OpenAIChatResponse) async -> Void' to parameter expecting synchronous function type with two functions

I have two functions: @MainActor func sendMessage(messages: [Message], completion: @escaping (_ response: OpenAIChatResponse) -> Void) async { let openAIMessages = messages.map({...
Mr. Man's user avatar
  • 86
0 votes
0 answers
18 views

Django - Cannot make a celery worker and test transactions on test file without "You can't execute queries until the end of the 'atomic' block." error

Soo, here's the deal, Im creating a test in order to check if an improvement a made for performance is working or not, the improvements consists in making some signals logic an async task instead of ...
Andrew Alizaga's user avatar
0 votes
0 answers
43 views

Alert in that code prevents the display of the image [duplicate]

async function displayImageAndAlert(url1) { const img = new Image(); img.src = url1; await img.decode(); await document.body.appendChild(img); alert('What ...
trzczy's user avatar
  • 1,449
1 vote
1 answer
40 views

How to call an async method from a sync method within a larger async method

As said I want to call an async method from a sync method, the problem is the sync method is being called by another async method so roughly something like this... async def parent_async() ...
dsollen's user avatar
  • 6,299
-2 votes
1 answer
30 views

Problem when trying to fetch data from the Fetch API. Empty parentheses arrive before clicking in the console [closed]

I'm trying to get a data from fetch API, but my result is empty before I click on result in console. And I couldn't manage this data in my app. I don't have something, problem with asynchronous ...
Abdulla's user avatar
0 votes
0 answers
59 views

Using @MainActor on ObservableObject gives warning about publishing changes from background thread

While working on a simple app to learn more about SwiftUI I get the runtime warning Publishing changes from background threads is not allowed; make sure to publish values from the main thread (via ...
Pieter's user avatar
  • 133
1 vote
1 answer
115 views

What is the difference between await method(), await method().ConfigureAwait(true), and await method().ConfigureAwait(false) in C#?

I'm trying to understand the differences between the following three usages of the await keyword in C#: await method(); await method().ConfigureAwait(true); await method().ConfigureAwait(false); ...
Dhanush S's user avatar
0 votes
0 answers
22 views

How to write an async function that handles the entire licycle of a scrapy spider and can be re run multiple times?

Any assitance would be appreciated. Since scrapy is based on twisted, it has an archaeic way to deploy and run spiders. "Twisted Reactor" can only started and stop once and cannot be ...
Nice Guy's user avatar
  • 165

15 30 50 per page
1
2 3 4 5
3459