Multi-threading is how work performed by a computer can be divided into multiple concurrent streams of execution (generally referred to as threads).

learn more… | top users | synonyms (2)

5
votes
1answer
47 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. ...
11
votes
0answers
60 views

Getting chatty with FX

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 ...
4
votes
2answers
35 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
857 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. ...
-1
votes
0answers
24 views

Queue consumator

I am consuming messages from Kafka (a queue). There are multiple consumer which are reading. What do they do? They simply read message as a String, parse them and ...
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
53 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
306 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
58 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
37 views

ReadWriteMap implementation

I had a task to realize ReadWriteMap ...
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
54 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
46 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
93 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
65 views

Simple Implementation of a BlockingQueue

An implementation of BlockingQueue ...
3
votes
1answer
35 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
124 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
262 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
53 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
70 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
80 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
102 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
88 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
56 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 ...
3
votes
0answers
68 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
141 views

C++11 recursive atomic spinlock

Could you please review my spinlock implementation? ...
0
votes
0answers
31 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 ...
3
votes
0answers
24 views

Project Euler #2 in Go

I just learned Go (yesterday in fact) and today I made this solution to Project Euler #2. The problem is to sum the even Fibonacci numbers. My program uses the matrix representation of the linear ...
2
votes
1answer
69 views

Concurrency Bank exercise with multiple accounts

I am doing an exercise in Java concurrency. The problem statement is as follows: Bank holds an array of Accounts. Client do (in a loop) the following operations: (1) work, then sleep for random ...
4
votes
0answers
60 views

Blocking reads when writes are happening on two flows

I am trying to implement lock by which I want to avoid reads from happening whenever I am doing a write. My requirements are: Reads block until all three maps have been set for the first time. Now ...
4
votes
1answer
49 views

Multithreaded scoreboard for different levels

For an assignment I had to create a highly multi-threaded scoreboard for a multi level game. So every time a user adds a score if the level doesn't exist, it gets created ad-hoc. Important point: a ...
1
vote
2answers
79 views

AsyncTask alternative with Runnable and CountdownLatch

What is wrong with this pattern which emulates AsyncTask functionality?: ...
7
votes
3answers
117 views

Parallel factorial algorithm using std::thread

This code calculates the factorial of a number on multiple threads. My issue: it is only a little bit faster than the sequential version of it (and I think I know why, I just can't find a way to solve ...
3
votes
1answer
108 views

Safely storing Azure Topic clients in concurreny dictionary

I am trying to optimize the usage of TopicClients in my app. The instance is originally covered by interface and passed by IoC, so the IoC will dispose it at the end of the program life cycle. This ...
7
votes
1answer
58 views

Python Socket Receiver

I put this together and am having some doubts to the number of connections I can make. I also doubt if I can brute force the server to serve up connections and then hang. Please take a look and tell ...
5
votes
2answers
234 views

Classic Snake game using Python, Tkinter, and threading

I have just installed Ubuntu and am re-familiarizing myself with Python. I learned the basics in late 2012-early 2013 and I'm practicing with it in order to get better at programming concepts and ...
5
votes
1answer
84 views

A Stream wrapper that executes all writes asynchronously

I wanted to make a Stream that can wrap another stream and buffer all writes, to increase performance; comparable to the ...
2
votes
1answer
93 views

Async processes in Java Spring

I need to refactor this class having in mind that the logic inside the call methods is not so short and it require spring dependencies to work, the base class I have is: ...
4
votes
1answer
84 views

Lock-free bounded stack atomics

I was thinking about using very basic bounded (preallocated) stack to keep track of my threads IDs in correct LIFO order. I was wondering if my implementation is thread safe: ...
10
votes
2answers
317 views

Memory cache implementation

I have created an open source memory cache called cachew and can be found here: cachew. I would like your help to make it better. Regarding the class Cache or its ...
3
votes
1answer
46 views

Implementation of FastICA in multithreading approach

I am to implement a parallel version of FastICA, so I implemented the serial version of FastICA. Now this is the architectural diagram of how it is going to parallelize. I just coded a basic ...
1
vote
2answers
49 views

Computing the correlation of an analyzed stock ticker

I have an enum of stock tickers, then from the database I get details for an analysed ticker (stock). In the loop, I compare the details of the analysed ticker to details of the rest of tickers, ...
7
votes
1answer
203 views

One producer multiple consumers

I want to code the following scenario: One Producer: produces n (n=100 here) objects m Consumers (m = 5 here): consumes k (k = 10 here) objects at a time in a round robin fashion; Consumer 1 first ...
1
vote
1answer
58 views

System to handle the short lived async task

I'm developing an application in which there are many short-lived tasks which are run in separate threads. I've developed a generic and reusable system to handle such a requirement. The code snippet ...
2
votes
1answer
61 views

File upload to web server using HttpRequestFutureTask

I am working on uploading files through Rest API. Tried my hand using single upload and works. I have modified to accommodate parallel uploads using Futures. Will there be any chance that this code ...
0
votes
1answer
44 views

Canvas in Tkinter app for Conway's Game of Life updates so slowly

This is Conway's Game of Life written in Python and using Tkinter for GUI. Problems are: The "Play" button works so slowly. I can see how the canvas is redrawing from top to bottom. But when I ...
4
votes
1answer
33 views

Adding hostname to block list after x consecutive failures in multithreading application

I am using Callable in my code which will be called by multiple threads as shown below. Given a user id in DataKey object, I will find out what are the ...
3
votes
2answers
123 views

Multi-threaded domain status checking in Java

I'm tinkering with the idea of crafting a search engine in my spare time. More of a learning experience than anything at this point, but still a project. A key aspect of this system is checking ...
4
votes
1answer
34 views

Monitoring and re-establishing a PostgreSQL connection

Within a complicated Ruby project, I need to monitor the connection to a PostgreSQL database, as answered here. I use a thread for this purpose. Every few milliseconds, I invoke "consume_input" which ...
2
votes
1answer
40 views

Running alarms in python

My code is designed to simply trigger alarms; it is not supposed to be used by anyone but me. ...