Skip to main content

Questions tagged [multithreading]

Use this tag when the program performs its work using multiple concurrent threads of execution.

7 votes
1 answer
53 views

Mandelbrot set visualizer using GTK4, Cairo and POSIX threads in C

I have recently implemented a Mandelbrot set visualizer, which I used to reacquaint myself with multithreading using pthreads. I'm just wondering whether the way ...
blablatruck's user avatar
6 votes
1 answer
317 views

Implementing a mutex-free thread safe scheme for protecting a object

I've written a MQTT client for embedded system with RTOS (understand not POSIX, generally FreeRTOS). There's no pthread in the system. There's only 32 bits atomic instructions supported. The client ...
xryl669's user avatar
  • 163
4 votes
1 answer
175 views

API having flow - normal flow along with background poller(it also involves events which is not shown here)

We have an API in which we call external service with a tracking id.This first part of the API workflow makes an entry to the DB as SUBMITTED after the call to first external API say /E1 finishes and ...
yoda's user avatar
  • 277
0 votes
0 answers
45 views

ReadWrite Lock compatible with coroutines

A while ago I wrote for my own needs a (non-reentrant) read-write lock for kotlin's coroutines. I got no reactions on the relevant github thread. I think it's a nice code, so I thought I'd share it ...
Al.G.'s user avatar
  • 109
10 votes
3 answers
1k views

C++17: shared_mutex protected DNS cache (rare writes, many reads) return-by-value vs decltype(auto)?

I’d appreciate a review of this small DNS cache. It stores pairs of domain and IP address and uses a std::shared_mutex because reads are frequent and writes are ...
sam's user avatar
  • 379
2 votes
0 answers
176 views

Namespace-scope try_lock_for / try_lock_until pt. 2

This is my second iteration of implementing try_lock_for/try_lock_until function templates in which I've cherry-picked a bunch ...
Ted Lyngmo's user avatar
4 votes
1 answer
167 views

Freestanding try_lock_for / try_lock_until

This is a breakout of a small part of unique_multilock (unique_lock + scoped_lock) implementation where it was suggested to put the logic in the member functions ...
Ted Lyngmo's user avatar
4 votes
3 answers
694 views

Multithreaded array summation in Java - best practice, structure, acceptable use of Constant classes. There is no concurrency?

The task is educational. The basic functionality is working. Here are some questions for my code. Please give me feedback. Main: Architecture & Design: Is the decomposition appropriate? Should ...
bonnyped's user avatar
5 votes
2 answers
188 views

unique_multilock (unique_lock + scoped_lock) implementation

Inspired by How to implement unique_lock for multiple mutexes? I've implemented a RAII mutex locker with the combined capabilities of std::unique_lock and ...
Ted Lyngmo's user avatar
7 votes
3 answers
1k views

Rotary Encoder Controller C++

I built a controller with 3 rotary encoders to control various parameters of a program i wrote to control a motor. The controller delivers data via usb through serial (Arduino). Originally I used OSC ...
herrgross's user avatar
1 vote
0 answers
81 views

A parallel MSD radix sort in Java for long keys with near linear speedup

Intro I have this implementation of a parallel MSD (most significant digit) radix sort. It runs in $$\mathcal{O}\Bigg( \bigg(\frac{N}{P} + PB \bigg) \log_B \sigma\Bigg),$$ where \$N\$ is the length of ...
coderodde's user avatar
  • 31.9k
8 votes
2 answers
1k views

C# wait for a state change without blocking

I have a class that manages an HttpClient to make API requests to a third party service. The service requires being logged in to make requests. When logged in, a ...
yasar's user avatar
  • 1,597
6 votes
2 answers
880 views

ParallelSudokuSolver.java: solving semi-large Sudokus via multi-threading

Intro This time, I have programmed a parallel sudoku solver in Java. Code io.github.coderodde.sudoku.ParallelSudokuSolver.java: ...
coderodde's user avatar
  • 31.9k
0 votes
2 answers
129 views

Small library for metrics scraping in C++

I did an internship test project (source: https://github.com/SynI20N/VKInfo). Looking for some middle or senior devs to rate it and point out potential problems with my code. Follow up: How would you ...
SyRoN's user avatar
  • 9
2 votes
0 answers
37 views

GUI button clicks start runspaces that take care of heavy processing tasks

I'm currently updating a ping script I maintain at work, transitioning from WinForms to WPF. Because of this I've started learning about and incorporating runspaces to keep the GUI responsive during ...
K_P's user avatar
  • 21

15 30 50 per page
1
2 3 4 5
109