Skip to main content
Stack Overflow
  1. About
  2. For Teams

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
0 votes
0 answers
30 views

Laravel + RoadRunner + SQS — API workers blocked while publishing to SQS (70ms latency per request)

I’m running a high-concurrency Laravel application on an EC2 instance using RoadRunner (12 PHP workers). Each incoming request simply publishes a message to AWS SQS — that’s all it does. The problem: ...
0 votes
0 answers
76 views

Distributed lock still require waiting in the end? [closed]

There are many articles suggesting the use of Redis-based distributed locks in concurrent environments. But in the end, don’t they still require waiting? Let’s say we’re using a Spring Boot ...
-4 votes
1 answer
87 views

A global sync.Mutex don't work with multiple client packages?

I have a package "tools" that expose a method that must execute some logic only one time. The next calls don't do nothing. The file tools/tools.go is like: package tools import ( "...
-1 votes
0 answers
43 views

Minimum number of messages to protect critical section [closed]

From The Little Book of Semaphores section 1.5.3: Imagine that Alice and Bob operate a nuclear reactor that they monitor from remote stations. Most of the time, both of them are watching for warning ...
2 votes
1 answer
91 views

Why does Bionic's sem_post implementation wake all waiters instead of just one?

I'm having performance issues on Android when sem_posting on a contended semaphore with a somewhat large number of (pshared) waiters. What I'm trying to do is to spawn a large number of processes, ...
0 votes
0 answers
34 views

Scaling APScheduler 4.0.0a2 with Executors — Jobs Ignored When Multiple Schedules Run Simultaneously

I'm currently using APScheduler 4.0.0a2 in my project, and I'm running into multiple issues: No migration path: I noticed that there’s no migration available from 4.0.0a2 to 4.0.0a6, which is ...
1 vote
1 answer
71 views

Swift 6 Strict Concurrency accessing C shared instance

I am trying to adapt C code, measuring pre/after main time, so it could be accessed from Swift with SC on. But nothing can silent compiler warning, indicating this code is not safe. I've tried every ...
2 votes
2 answers
73 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) ...
6 votes
2 answers
177 views

C++ pointers and concurrency

I need some help for understanding general basics of shared resource access in C++ multithreading. When I need some variable that must be accessible for several threads, I declare it as atomic, or ...
2 votes
0 answers
34 views

Understanding how @MainActor executes background-tasks [duplicate]

The function 'refreshAllServers' is annotated with @MainActor: @MainActor private func refreshAllServers() async { defer { queueRefresh() } guard servers.isEmpty == false else { ...
0 votes
0 answers
145 views

How do you know if non-atomic writes to variables will be observable cross-core after atomic operations?

I have work that must be done on a specific core. To do this, I've created a thread and assigned it to that core. Now, I'm trying to figure out a generic way to give it work to do, and receive the ...
1 vote
0 answers
69 views

How to safely refresh shared access token in Cloudflare Worker?

I’m using a Cloudflare Worker to proxy requests to a third-party API. The API uses client credentials flow with an access token that expires after 1 hour. I have several functions in my Worker that ...
2 votes
1 answer
113 views

How to cancel a "range over func" iteration early with context.Context in Go 1.22+ without leaking goroutines?

Go 1.22 introduced iterating over functions with for ... range. I’m trying to make a generator that respects context.Context so that breaking early doesn’t leak a goroutine. package main import ( ...
3 votes
0 answers
72 views

Avoiding race conditions for time-range inserts in MongoDB

I have a scheduling system on MongoDB using Node.js + Mongoose. Collections: Drivers, Vehicles, Trips. I need to insert a new Trip for a given driverId, date, startTime, endTime only if that driver ...
0 votes
4 answers
142 views

How to write a batch file that processes a maximum number of files concurrently

I have a folder that contains 1000 .wav files on a Windows 7 system. I have fdkaac.exe in the system environment path. If I run the following batch file: for %%i in (*.wav) do fdkaac.exe -b256 -w20000 ...

15 30 50 per page
1
2 3 4 5
...
1569

AltStyle によって変換されたページ (->オリジナル) /