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
51,859
questions
0
votes
0
answers
49
views
I can't understand the problem with 'for_each' in Rust
I am writing a program on rust to create a telegram bot, which should also asynchronously send a request to another service.
I can't compilation program, get problem
Full text program:
use telebot::...
1
vote
2
answers
74
views
Different thread with async/await
I've heard a lot about how a new thread is not created with async await. I decided to check what would happen if there was an while(true) in the main function and the asynchronous function.
namespace ...
0
votes
0
answers
6
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 ...
0
votes
1
answer
61
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 ...
0
votes
0
answers
10
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. ...
0
votes
1
answer
22
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 ...
0
votes
0
answers
37
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:...
1
vote
0
answers
27
views
+50
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 the Ollama Python API. I want to cancel the response generation by clicking the stop button. The problem is that the task ...
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....
0
votes
1
answer
79
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({...
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 ...
0
votes
0
answers
51
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 ...
1
vote
1
answer
42
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()
...
-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 ...
0
votes
0
answers
61
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 ...