Skip to main content

Questions tagged [multithreading]

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

Filter by
Sorted by
Tagged with
8 votes
3 answers
124 views

I am writing tests for legacy software which has a dependency on CGI scripts on a remote machine. Mocking the dependency would entail modifying the code under test, which is a thing I cannot do at the ...
Afelium's user avatar
  • 133
6 votes
1 answer
350 views

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
0 votes
0 answers
53 views

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
2 votes
0 answers
182 views

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
3 answers
707 views

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
7 votes
3 answers
1k views

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
8 votes
2 answers
1k views

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
0 votes
2 answers
132 views

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
4 votes
1 answer
115 views

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
2 answers
132 views

Trying to learn windows internals and made my first work with Events and Threads. What do you think about my code? Any advice? ...
vansergh's user avatar
  • 313
3 votes
1 answer
145 views

Abstract Problem The basic problem is that of producer/consumer. Wait for an async Producer to [produce an item] or [fail], together with a timeout on the consumer side. Using Java's ...
JayC667's user avatar
  • 131
7 votes
1 answer
756 views

The goal is to brute force the length of the shortest unrestricted path that touches any part of each square within an n by n square grid. Unrestricted path meaning any continuous curve between two ...
tomka700's user avatar
  • 203
4 votes
1 answer
104 views

I am interested in creating a class that manages a thread and executes SQL queries sequentially within it. The queries would be submitted from various parts of the program, and the results would be ...
QuitLN's user avatar
  • 43
10 votes
2 answers
1k views

Description For fun, and to learn some C++, I've decided to reimplement the entirety of EVE online as I remember it. (I'm aware this is an insane and likely unreachable goal, that's intentional). I'...
Adam Barnes's user avatar
4 votes
3 answers
203 views

I'm experimenting with Threads in Java and came upon the ExecutorService class. I've written the following code: ...
Fang's user avatar
  • 617
3 votes
1 answer
126 views

I have written a web scraping script using Selenium to crawl blog content from multiple URLs. The script processes URLs in batches of 1000 and uses multithreading with the ThreadPoolExecutor to ...
Minnie's user avatar
  • 31
2 votes
1 answer
100 views

I've implemented a multithreaded merge sort using Java's ForkJoin framework, and I wanted to gather feedback on its correctness, efficiency, and scalability. Here's my implementation: ...
Akash Gupta's user avatar
2 votes
1 answer
70 views

I wrote this code for a make-up assignment to pass one of my college class and graduate from my program in the field of electronic and embedded system. It's pretty much the realization of a solar ...
Null_DreiAcht's user avatar
5 votes
2 answers
693 views

The code below was written for an interview question of designing a load balancer with only a register() method. ...
drets's user avatar
  • 313
3 votes
1 answer
169 views

This is an improved code version for Amount Transfer Between Different Accounts Welcoming any further improvements for this. ...
Jill's user avatar
  • 277
5 votes
2 answers
958 views

I implemented the below URL Shortener class. Used ConcurrentHashMap to handle concurrency. Short URL building logic may not be optimal, but it ensures that only ...
Jill's user avatar
  • 277
3 votes
1 answer
82 views

Previous version of my ThreadPool is here This one is improved and updated using advices: added variables list (vector) to not use std::any. it's very basic and simple. added thread-safe queue !main....
vansergh's user avatar
  • 313
9 votes
1 answer
248 views

Task I wrote a movie barcode generator in C++ using OpenCV. Self-described engineer, space lover and tea drinker Thomas Poulet defines a movie barcode as follows: A Movie Barcode is the color ...
Jay Gupta's user avatar
  • 151
8 votes
2 answers
1k views

The TCP server in the code snippet below is designed to: Read data using one thread while writing data with another thread. Allow only one client to be connected at a time. Automatically close the ...
John's user avatar
  • 469
2 votes
1 answer
117 views

I'm new to threading in Python. I want to use it to speed up taking images on my lab computer. I have the following dummy code: ...
AccidentalTaylorExpansion's user avatar

1
2 3 4 5
33