Skip to main content
1 vote
1 answer
61 views

How to execute async code for thread-locals in a non-threaded environment?

I need to execute an async function for a thread local. The minimal example: use std::cell::RefCell; thread_local! { static REQUESTS_CHECKER: RefCell<()> = RefCell::new(()); } async fn a() ...
porton's user avatar
  • 5,885
-3 votes
1 answer
72 views

I apparently hit a Rust bug, what to do?

I apparently hit a Rust bug. The minimal example: use std::cell::RefCell; thread_local! { static REQUESTS_CHECKER: RefCell<()> = RefCell::new(()); } async fn a() {} async fn b() { ...
porton's user avatar
  • 5,885
0 votes
0 answers
38 views

How to get socket_descriptor in Asynchronous MySQL? [closed]

I need asynchronous work with MySQL, I use _nonblocking functions as: mysql_real_connect_nonblocking, mysql_real_query_nonblocking, mysql_store_result_nonblocking (https://dev.mysql.com/doc/c-api/9.3/...
kornovn14's user avatar
-1 votes
0 answers
47 views

Propagating custom thread-local variables across async calls in Spring Boot microservices [closed]

I have a Spring Boot microservices setup where I use @Async methods for asynchronous processing. I need to propagate custom thread-local variables (like correlation IDs, user context, or request ...
anmoL's user avatar
  • 1
0 votes
1 answer
37 views

How to handle Android UI events in C++ without blocking the main thread but keeping execution order?

I’m building an Android native application where most of the business logic resides in C++. For example, UI events like Key Press or Drag-Drop arrive on the main thread. To process them, I forward ...
Rohan Pande's user avatar
0 votes
0 answers
95 views

How can I create a single function in Rust that accepts both sync fn and async fn?

I’m building a small web server in Rust and I want the server’s add_route method to accept both synchronous and asynchronous handlers ergonomically. Goal: allow end-users to write code as simple as: //...
Fahed's user avatar
  • 203
1 vote
0 answers
38 views

Resolve promise in a typescript non async function [duplicate]

I have a typescript file with the following non async function. export function MSALInstanceFactory(): IPublicClientApplication { const environmentService = new EnvironmentService(); const ...
meji's user avatar
  • 1,108
2 votes
2 answers
69 views

Why is asyncio.gather returning results in a different order than my tasks?

I’m learning about asynchronous programming in Python and testing with asyncio. import asyncio import random async def worker(name): delay = random.randint(1, 3) await asyncio.sleep(delay) ...
Anuj Mishra's user avatar
0 votes
1 answer
74 views

Spawning multiple tasks but inner function is not executed without error message

I'm trying to spawn multiple parallel (not concurrent) tasks. Every task is running a PUT operation to a custom S3 storage using AWS SDK for Rust. The function body looks the following (the different ...
lukeflo's user avatar
  • 185
0 votes
1 answer
76 views

Get duration of a video by swift API in macOS

I'm working for weeks to get the duration of a video file. I want to use direct api calls. I know, that I can use external command line tools to get it. But I want to avoid the dependencies with these ...
Peter71's user avatar
  • 2,314
-1 votes
0 answers
72 views

How can my router accept async handlers (`async fn(&Request) -> Response`) without changing call sites?

I’m building a small HTTP library with both sync and async runtimes (Tokio,async-std or smol). I'm using Rust edition 2024, and for this crate I' trying to keep dependencies as few and as stable/basic ...
Fahed's user avatar
  • 203
1 vote
1 answer
77 views

Writing and running a stored procedure asynchronously *and* getting a return value

Suppose I have two stored procedures, foo and bar, both written using Snowflake Scripting language. Inside foo, I want to call bar asynchronously and get a return value from bar. Is there currently a ...
Kal's user avatar
  • 1,729
0 votes
1 answer
106 views

Return timing of dart `Future` objects in asynchrounous functions

First, Please correct me anything I inferred about asynchrounous programming in dart, and even what I summarized from the docs, And please check if my idea about when Future objects are correct. I ...
B1LLP4RK's user avatar
0 votes
1 answer
108 views

why am I getting "Bad state: Stream has already been listened to."?

Before asking this question, I extensively searched stackoverflow and other platforms for similar questions. However I could not find an answer to my problem. So, basically, I am trying to use dart ...
Alp's user avatar
  • 3,147
0 votes
0 answers
48 views

WPF main function becomes MTA when made async

I have a WPF application and I'm trying to do some async stuff in the startup. I'm trying to move from: [STAThread] public static void Main(string[] args) { _app = new Application { ...
sfaust's user avatar
  • 2,445

15 30 50 per page
1
2 3 4 5
3468