Skip to main content
1 vote
0 answers
49 views

I have the below code (whole code is here) that polls a queue for runnables and parks itself if the queue is empty. public void waitAndDrain() throws InterruptedException { throwIfInterrupted(); ...
Kannan J's user avatar
  • 225
-3 votes
0 answers
52 views

You are given a N×NN×N 2D grid representing possible quantum states, where each cell contains a 32-bit unsigned integer. Your task is to find a continuous path from the top-left (0,0) to bottom-right (...
SaujasByt's user avatar
1 vote
1 answer
80 views

I’m migrating a NotificationManager class to Swift 6. This class is a small utility wrapper around NotificationCenterand has a method that lets users register a notification that will triggerunless ...
Bill's user avatar
  • 46k
0 votes
1 answer
47 views

Suppose I have code similar to this: const client = await createClient() .on("error", (err) => console.log("Redis Client Error", err)) .connect(); const promise1 = client....
Vilx-'s user avatar
  • 107k
1 vote
1 answer
53 views

I am facing an issue where my Actix-web server starts correctly, but the moment I hit the /upload_chunk endpoint from my frontend, the request hangs forever. After some debugging, I found that the ...
forstudy's user avatar
0 votes
1 answer
82 views

Previously I had a question on an example of multiprocessing which you can see in the following link I used a 2 workers pool to split a sum in a function with Python multiprocessing but the timing ...
AmirHosein Sadeghimanesh's user avatar
0 votes
1 answer
122 views

I have the following C# code : var rand = new Random(1); var range = Enumerable.Range(1, 8); var partition = Partitioner.Create(range, EnumerablePartitionerOptions.NoBuffering); foreach (var x in ...
tigrou's user avatar
  • 4,596
0 votes
2 answers
134 views

I am trying to implement a lock-free multiple-producer-single-consumer ring buffer in C++. Here is the full definition and the test code. #include <iostream> #include <memory> #include <...
God_of_Thunder's user avatar
3 votes
1 answer
80 views

In Java, when using scheduleAtFixedRate, is it possible for a task to execute before the ScheduledFuture returned by scheduleAtFixedRate has been assigned? For example, could the following code throw ...
Xin Zhang's user avatar
Best practices
0 votes
0 replies
27 views

I have an actor with some values. I understand that if I want to get it, I need to actor isolate the data, but I want to use it in a class where I also need the data synchronously so I made a ...
kisstajmi's user avatar
  • 265
0 votes
0 answers
41 views

I have this backend: from fastapi import FastAPI, HTTPException import uuid import asyncio import random import time from loguru import logger import redis from contextlib import asynccontextmanager #...
KansaiRobot's user avatar
  • 10.6k
-2 votes
0 answers
53 views

Given a class A, and a class B, where class A holds a reference to class B, and where some logic in A depends on some state in B, how can i configure EF Core to make sure B has not changed when ...
Claude Hasler's user avatar
2 votes
1 answer
65 views

I have a long running Python application built on asyncio. It launches several background tasks that run indefinitely and occasionally performs CPU work using asyncio.to_thread. Everything works fine ...
efenatuyo's user avatar
-2 votes
0 answers
98 views

Edit Here is a similar question but is specifically about request sync block in async. I'm just curious more about why the concurrency means they all take substantially longer - at different places in ...
user2616166's user avatar
0 votes
1 answer
98 views

I’m building a data ingestion pipeline in Python that collects data from a third-party REST API. The API allows a maximum of 100 requests per minute, and I need to fetch data for tens of thousands of ...
Swati's user avatar
  • 214

15 30 50 per page
1
2 3 4 5
1569