Skip to main content

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [multithreading]

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

Filter by
Sorted by
Tagged with
4 votes
1 answer
166 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
40 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
170 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
149 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
678 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
169 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
76 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
876 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
118 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
34 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
4 votes
1 answer
103 views

Simple async lock using key in .NET

The task is to make a simple LockProvider that will lock a thread by identifier. Basic requirements: Simple call via using block. Support for CancelationToken to get out of waiting without exceptions....
sDima's user avatar
  • 889
3 votes
1 answer
78 views

More shortest unrestricted paths to touch every square in an n by n grid

This is a part two. The problem originates from here, it is solved for \$n<11\$. A GitHub repository for this code, printing paths, and a collection of all proven best paths, it is open to ...
tomka700's user avatar
  • 203

15 30 50 per page
1
2 3 4 5
109
Morty Proxy This is a proxified and sanitized view of the page, visit original site.