Multi-threading is how work performed by a computer can be divided into multiple concurrent streams of execution (generally referred to as threads).
2
votes
1answer
38 views
Asynchronous object destruction service
Inspired by the recent Stack Overflow question “Safely release a resource on a different thread”, I wrote the following destruction_service<T>. Please refer ...
3
votes
1answer
35 views
Network chat in Perl
I have written a network chat program as my first major project in Perl. It makes simple use of REGEXP's, modules, sockets, command-line option parsing, and forking and uses these features to produce ...
2
votes
1answer
38 views
TCP server with user accounts, connection threading, and groups/permissions
This is a TCP server I am currently working on. It is accessed through telnet (I know it isn't secure, its just a project for uni). The server is programmed in Python 3.
I am currently trying to ...
1
vote
0answers
50 views
Implementation of a lock-free fixed-sized allocator - follow-up - with commented code
The following implementation of a lock-free fixed-size allocator is a follow-up of:
Implementation of a lock-free fixed-sized allocator
§1 - Introduction
The purpose is self-learning of atomic ...
12
votes
1answer
548 views
Messed up Elevator Management System
In light of our current community-challenge I decided to build an Elevator Management System.
Initially I intended to program the EMS like a real-time operating system and the elevators as ...
6
votes
1answer
87 views
Thread safe holder
I have implemented a thread safe holder to safely pass data between threads.
User can set value many times, but only the first SetIfEmpty call stores the value, ...
5
votes
2answers
52 views
Iterate faster through the Android file system and find specific files using java multithreading
I'm trying to extract specific files and visualise them in a list/grid. For that purpose I'm starting a Service to do the background job, and when it finishes it fires an Intent which will be captured ...
9
votes
2answers
227 views
Implementation of a lock-free fixed-sized allocator
This question now has a follow-up:
Implementation of a lock-free fixed-sized allocator - follow-up
I've tried implementing a lock-free fixed-size allocator while trying to learn synchronization ...
2
votes
1answer
46 views
Destroying a process if it takes too much time
I am executing a shell script from my Java program using Process and I want to kill/destroy that process if my script takes long time.
I came up with this code and ...
2
votes
1answer
46 views
Producer-Consumer in C++ - follow-up
To expand from the changes supplied by the answer of my previous question:
...
6
votes
2answers
116 views
Producer-Consumer in C++
This is my first experimentation with the producer-consumer problem (and thread manipulation in general), so any feedback on taboos and fixes is greatly appreciated!
...
5
votes
1answer
40 views
Fill a container from several threads
I want to generate some random data and store it in a container. I split the container into disjoint intervals using iterators and pass them to a thread function (I hope its body isn't important ...
4
votes
1answer
38 views
Android Network Job Queue
I've just finished working on a multi-threaded network queue and was wondering where I could improve. I'm a little rusty when it comes to waits and such.
The idea is to queue up network actions ...
2
votes
0answers
23 views
Sieve32FastV2 - A fast parallel Sieve of Eratosthenes
I’ve created a much cleaner, better designed version to my parallel sieve. I’ve implemented most of EBrown’s micro-optimizations but also revamped the code on my own (that is not in direct response ...
-1
votes
0answers
44 views
7
votes
2answers
151 views
Non-blocking, non-threaded HTTP client implementation
This is a C# WinForms program targeting .Net 4.5. I am using it for a movie organizer application that will contact sites like OMDB, MyApiFilms, etc. for data about the movies. At the main application ...
2
votes
1answer
30 views
Unreliable shared memory circular buffer with read-only consumer
This code is slightly platform dependent but should be pretty easy to port. The goal with this code was to create a circular buffer where the consumer could be limited to read-only access of the ...
8
votes
3answers
213 views
Multithreaded Mandelbrot Generator
I built one of these long ago, and it got lost when I reformatted my SSD (sad day) so here is the new version.
It is very multithreaded, spawning numCores - 1 ...
7
votes
1answer
86 views
Sieve32Fast - A very fast, memory efficient, multi-threaded Sieve of Eratosthenes
An improved version Sieve32FastV2 is available.
The classical solutions for the Sieve of Eratosthenes fall into 2 camps: one uses a bool[], which is fast but very ...
1
vote
0answers
37 views
C++ (foreign) thread pool
I created a class which is some Kind of thread pool. The difference is that it hold foreign threads. This means that the threads are created somewhere else and are then hold by calling ...
3
votes
2answers
105 views
Self-written Mutex for 2+ Threads
I have written the following code, and so far in all my tests it seems as if I have written a working Mutex for my 4 Threads, but I would like to get someone else's opinion on the validity of my ...
6
votes
1answer
40 views
Class managing queuing updates from another thread, Version 2
This is an updated version of: Class to manage updates coming in from another thread
Managing updates from other threads into Swing is a hard problem. In MVC design, if you don't want to have the ...
6
votes
1answer
99 views
Abort thread on new request, but complete only last request
The situation is that a certain asynchronous operation is called multiple times, which is basically to consolidate results. But I want to abort every time a new request comes in, which means that only ...
5
votes
2answers
51 views
Class to manage updates coming in from another thread
Managing updates from other threads into Swing is a hard problem. In MVC design, if you don't want to have the Presenter be responsible for Thread safety, you can end up with deadlock issues, and also ...
6
votes
1answer
84 views
IP Range Port Scanner
I've been working on this project to learn networking and concurrency as well as C++11 practices. I'm just looking for a general code review.
...
20
votes
3answers
337 views
Network chat app
Applying a lot of unprecedented concepts here, it's a simple chat server capable of handling multiple clients, which are run through JavaFX, and have their individual threads instantiated and handled ...
5
votes
2answers
47 views
Compute correlation (3 types) of stock ticker
I'm developing a web application allowing a logged-in user to find most correlated stocks for selected stock ticker. The user chooses a ticker, period of time (10, 30, 60, 90) and type of correlation ...
7
votes
3answers
875 views
Game server packet handler
I am developing an online game and my code is getting pretty hard to work with. I would appreciate any suggestions how to clean it up or make it simpler to work with. Thanks for any suggestions.
...
2
votes
1answer
27 views
ActionGroupContext to know an id of the current context
My services(or services that depend on services) need to know about a current action group id. To add an extra optional parameter to each service for the id was an idea but in my current environment ...
1
vote
1answer
64 views
Thread pool implementation in Java
I am studying multi-threading and have tried to implement a thread pool. Please provide feedback, mostly from multi-threading point of view. I have implemented two pools, one for adding tasks in queue ...
5
votes
1answer
375 views
Multithreaded client server socket
I have created this library mostly for a learning experience with sockets and threading.
For this review, focus on socket/threading. Let me know if I properly implemented both. If you want to comment ...
4
votes
2answers
66 views
Asynchronously accepting multiple client connections without impacting main thread
I am implementing a multi-player game in C# and having seen all sorts of projects, from indie developers all the way to large studios struggle to patch networking into existing products in the past, ...
2
votes
1answer
39 views
1
vote
0answers
30 views
Threadsafe webapplication getParameter()
I am new to Web Applications and Thread Safety. Please, could somebody tell me if the following example is thread-safe? My main concern is that the AClient and ...
1
vote
1answer
68 views
Brute-force word cracking program using /dev/urandom
I've been having fun with this program and trying to use different methods and such to achieve the fastest possible word cracking program I can come up with. I'm pretty happy with my current program ...
0
votes
0answers
63 views
Optimizing LINQ routines
I run a build system. Datawise the simplified description would be that I have Configurations and each config has 0..n Builds.
Now builds produce artifacts and some of these are stored on server. ...
5
votes
2answers
95 views
Downloading list of images
This code downloads a list of images, each in a different thread.
I have some questions about this code:
I don't know how to get information about correcting downloading (sometimes thread just ...
-3
votes
1answer
79 views
3
votes
1answer
44 views
MEF Execute Plugin Exports in Threads
I am developing a service application that would implement a peer to peer messaging system. I am wondering if my following code is the best approach. It works, but I am naive and it would be nice to ...
5
votes
2answers
152 views
Queue for distributing tasks between threads
I implemented the following class to dispatch std::function<void(void)> objects to a thread pool. Multiple threads will block on the pop call until a task is ...
10
votes
2answers
289 views
Chaining asynchronous tasks that must run sequentially
I want to implement an Agent-like object in C#. An Agent wraps some memory location (ideally storing an immutable object) and receives updates to that location. All ...
6
votes
1answer
54 views
A tiny module for handling text updates
I call these text updates "Feeds". A Feed object has some basic attributes like its content string, how many lives it has and its priority in the queue. I haven't ...
5
votes
2answers
79 views
Caching large object in multithreading environment
I'm having to dabble with caching and multithreading (thread per request), and I am an absolute beginner in that area, so any help would be appreciated.
My project requirements are:
Cache one ...
4
votes
2answers
97 views
Storing data into an SQL table using multiple threads and queues
I have a process running in a separate thread which reads data over Ethernet and raises an event for each read. Then, this data is processed over a tree of classes. At the top of my class tree, I want ...
10
votes
2answers
107 views
Thread safety/Transaction enforcer
I have some legacy classes written without thread safety in mind. Instances of these classes are now being accessed in a multithreaded context in a thread-un-safe manner. Cue chaos.
To fix this I ...
6
votes
2answers
94 views
Multithreaded Network Server
I would like the following code reviewed:
I am trying to create a local server which listens indefinitely and
provides the latest information. The server runs another while loop
which fetches ...
5
votes
0answers
79 views
Recursive shared_mutex implementation
I found myself in need of of a Readers-Writer mutex. With C++17 TR2 support not yet available in our compiler, I set out to implement std::shared_mutex so that we ...
4
votes
0answers
79 views
Dynamic voting protocol implementation for replicated file system
I recently implemented a dynamic voting protocol for a replicated filesystem. I would really appreciate it if you can review the design and some choices made with regards to sharing of Locks & ...
5
votes
1answer
162 views
0
votes
0answers
39 views
Parallel chunk uploading through HTTP requests
I am writing this class for parallel chunk level uploads to my local server. This reads the files in a given directory, uploads with n threads in parallel.
Initially, sends a request and obtains a ...