Questions tagged [async-await]
This covers the asynchronous programming model supported by various programming languages, using the async and await keywords.
async-await
27,369
questions
0
votes
1
answer
20
views
How to properly implement a ZoneSpecification(fork: ) handler in Dart
When I try to implement a fork override for ZoneSpecifications like this:
runZoned(
() {
runZoned(() {
print('in zone');
});
},
zoneSpecification: ZoneSpecification(
fork: (self, parent, ...
0
votes
0
answers
12
views
Firebase Authentication and Storage: Error Accessing user.user.uid [duplicate]
I'm trying to create a user account and upload an image to Firebase Storage using Firebase Authentication and Firestore. However, I'm encountering an error when trying to access user.user.uid ,Here's ...
-1
votes
0
answers
11
views
Async call to a func defined in extension from an isolated function in an actor preserves the isolation? [closed]
I have this setup:
protocol Foo {
func foo() async
}
extension Foo {
func foo() async {
print("default implementation")
}
}
final actor Bar: Foo {
func run() async {...
1
vote
1
answer
29
views
Event loop is closed Python Async
I've built an email script , utilising a user's app key from google to get access to their email. However when i run the script i get the error 'Runtime Error: event loop is closed.
On initial ...
0
votes
3
answers
66
views
C# member to check property for null and set it with async function if needed?
This is NOT a failure of anything. I'm just trying to determine how to write c# more elegantly.
In a C# project I find I am doing an awful lot of
if (null != classX.user || await classX.getUserAsync())...
-1
votes
1
answer
57
views
How can I call a Task & ValueTask inside a ValueTask?
I want to call the following code:
public async ValueTask UserGivenClaim(AppUser user, Organization org, string claim)
{
var notify = new NotifyClaims(user, org);
await notify.SetReplyToTask(...
0
votes
0
answers
35
views
How to ensure non-async portion of async function executes before view assignment?
I have following (simplified) model:
struct PostDetailResponse: Codable {
var post_detail: PostDetailContent
}
struct PostDetailContent: Codable {
var userHasLiked: Bool?
enum CodingKeys: ...
0
votes
0
answers
10
views
Facing error on implementing custom code for google enhanced conversion
async function processUserData() {
const userData = {
'sha256_email_address': await hashEmail(email.trim()),
'sha256_phone_number': await hashPhoneNumber(phoneNumber),
'address': {
'address....
0
votes
0
answers
15
views
Airflow 2.7.2 Trigger badld-written code block Triggerer's async thread
I am running Airflow version 2.7.2, and I constantly see the issue in my trigger log.
Triggerer's async thread was blocked for 0.50 seconds, likely by a badly-written trigger. Set PYTHONASYNCIODEBUG=1 ...
-1
votes
2
answers
44
views
Getting an error in console even though I have used try/catch and async/await
/* the code that is doing the API call, account.get() is an endpoint provided by Appwrite to get current user session data */
export async function getCurrentUser() {
try {
const user = await ...
0
votes
0
answers
20
views
Trying to avoid Timeouts testing my odoo app with Playwright
I'm having some troubles while testing my odoo app with playright.
I often find playwright clicking too fast for elements to be activated already, or to modify a field, then try to do something else ...
0
votes
0
answers
46
views
Azure Function OrchestrationTrigger Parallel Issue
I am building an Azure Orchestration Function App that has four different functions. The first function is a start task function that removes containers inside a Cosmos DB database. The second ...
0
votes
1
answer
56
views
Await inside if block not waiting
I am loading some data from a DB table using sequelize and caching it in an in-memory object with a TTL so I don't keep reading from the DB over and over again.
// ffm.ts
import { Op } from 'sequelize'...
1
vote
1
answer
67
views
How do I avoid .then or repeated await when chaining promises in TypeScript?
I wrote some code to wrap the Playwright Page to simplify a few operations. In one of my operations, I wanted to do something like typing and tabbing (this simulates the user behaviour better even if ...
-2
votes
0
answers
23
views
TypeError: undefined is not iterable (cannot read property Symbol) [closed]
I want to wait all async tasks complete -> TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
let status = []
const promises = files.forEach(async (file) => {
...