Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [concurrency]

In computer science, concurrency is a property of systems in which multiple computations can be performed in overlapping time periods. The computations may be executing on multiple cores in the same chip, preemptively time-shared threads on the same processor, or executed on physically separated processors.

0 votes
0 answers
9 views

CherryPy web server chokes on 50 concurrent users

I have a Cherrypy webserver that runs fine UNTIL it gets more then 50 concurrent users. Then the web server does not respond any more and times out at the web client. This happens with plain static ...
thedax's user avatar
  • 131
1 vote
3 answers
51 views

Can the coroutine launched through runBlocking be executed on 2 or more threads?

I have this runBlocking code and I wanted to know if its guaranteed that coroutine launched through runBlocking will always execute on the same thread (i.e. thread on which runBlocking started ...
Chapo144's user avatar
  • 102
0 votes
0 answers
30 views

proxy:error [pid 8118] (32)Broken pipe: [client *.*.*.230:50314] AH01084: pass request body failed to [::1]:5100 (localhost) - Nodejs API

I have created an API in nodejs (nestjs framework). Now client API call reaches load balancer then LB distributes the traffic to 2 machines on which nodejs API runs but request first comes to apache ...
Sujit Verma's user avatar
3 votes
1 answer
174 views

Why ReentrantLock is better for virtual threads than synchronized?

I've visited some IT conference and on a session about virtual threads feature in Java 21+ was mentioned that synchronized might(!) be a problem for virtual threads because of pinning virtual thread ...
gstackoverflow's user avatar
0 votes
1 answer
33 views

Concurrently test several Pytorch models on a single GPU slower than iterative approach

I want to test several models on different datasets. I want them to run concurrently on a single gpu. The general puesdo code is below. You would be able to run this with any dummy model or dataset. ...
Thomas K's user avatar
0 votes
0 answers
49 views

How to implement a custom coroutine dispatcher for specific threading models in Kotlin?

I'm working on a Kotlin project where I need to implement a custom coroutine dispatcher. The requirement is to have a dispatcher that utilizes a specific threading model rather than the standard ones ...
D.S's user avatar
  • 9
0 votes
1 answer
73 views

How can I formally verify the correctness of my WaitGroup implementation in C++?

Description I've implemented a WaitGroup in C++ assuming that: user must ensure that the counter value does not drop below zero. WaitGroup can be reused. Below is my code: class WaitGroup { public: ...
NJrslv's user avatar
  • 25
1 vote
0 answers
32 views

Optimizing Custom Double Release Lock and Semaphore in Python asyncio

I am currently working on a project involving file operations that need to be handled by multiple processors concurrently, but not by other threads simultaneously. For this, I've devised a concept ...
selah's user avatar
  • 21
1 vote
1 answer
63 views

call swift Actor from AVAudioEngine (synchronous) code

I'm using apple's AVAudioEngine code like this: var audioEngine = AVAudioEngine() audioEngine.inputNode.installTap { [buffer, when] in let waveform = myGetWaveform(buffer) Task { await ...
Colin's user avatar
  • 3,712
1 vote
0 answers
76 views

OpenCL flush absurdly slow, seemingly triggered by clEnqueueReleaseGLObjects in OpenCL/OpenGL interop

I'm writing an interactive application which uses OpenCL 1.2 to render each frame and which uses OpenCL-OpenGL interop to copy the frame to an OpenGL texture which is finally rendered via OpenGL. The ...
Danimator's user avatar
1 vote
1 answer
61 views

How to insert many rows of tags based on input array?

I have a table of posts, a table of hashtags, and a table linking posts to hashtags, like so: CREATE TABLE posts( id SERIAL PRIMARY KEY, post_data VARCHAR(128) NOT NULL ); CREATE TABLE hashtags ( id ...
learnandgrow's user avatar
1 vote
0 answers
27 views

STM32H747I-Disco Hard fault in Core M4 after Creating Thread on Core M7 in ThreadX

I am developing synchronization libraries on top of ThreadX for an STM32 project. My libraries work perfectly when used on ONLY either the M4 or M7 core while the other core is idling. However, when I ...
Adhip Shukla's user avatar
1 vote
1 answer
33 views

How to implement ordered fan-in (proper message passing for my language)?

I'm the creator of https://github.com/nevalang/neva It's a dataflow programming where you have nodes that do message passing through ports. I use go channels to implement that. However, I faced an ...
emil14's user avatar
  • 81
-2 votes
0 answers
23 views

Understanding concurrent channel read behavior [duplicate]

I wrote the code below to check the distribution of channel elements between two functions: package main import ( "fmt" ) func a(ch chan int, done chan struct{}) { for i := range ...
Warh40k's user avatar
2 votes
3 answers
457 views

Swift 6: Capture of 'self' with non-sendable type in a @Sendable closure

Context Consider this simple example, where we have an Actor and a Class which holds a reference to that Actor: actor MyActor { func doWork() -> Int { return 42 } } class MyClass { ...
Bryan's user avatar
  • 5,335

15 30 50 per page
1
3 4
5
6 7
1555