Multi-threading is how work performed by a computer can be divided into multiple concurrent streams of execution (generally referred to as threads).
4
votes
1answer
26 views
Basic expressive Swift background thread execution
I created a basic background thread class in swift to replace the ugliness of:
...
-1
votes
2answers
104 views
Use NLog from different classes in a DLL
I started using NLog. I wrapped NLog inside an internal class, for my own needs.
Is my implementation and usage correct?
If ...
4
votes
1answer
61 views
C++ EventHandler Class
I need to have some thread-safe event handler (like C#'s EventHandler), so I made one. Here is my event handler class and sample code (compiled with VS2013). Is ...
1
vote
0answers
34 views
Parallel Merge Sort in Scala
I have been trying to implement parallel merge sort in Scala. But with 8 cores, using .sorted is still about twice as fast.
Input file with 1.2M integers:
...
-3
votes
0answers
13 views
Bouncing ball program is not working [on hold]
In this bouncing ball program,when i call t.start() run method starts working as it prints value of x and y. but there is no change in position of ball. I have also called repaint() from run method. ...
2
votes
1answer
79 views
Inversion count via divide and conquer
I'm happy to hear thoughts and ideas on structure/performance/testing/whatever and multi-threading, which I haven't gotten into yet with Python.
Full code here. Assignment file and a test file ...
4
votes
3answers
73 views
Multithreaded web scraper with proxy and user agent switching
I am trying to improve the performance of my scraper and plug up any possible security leaks (identifying information being revealed).
Ideally, I would like to achieve a performance of 10 pages per ...
3
votes
1answer
71 views
Retry Runnable java
I want to make class to retry doing what I want if specific exception happen for n times before throwing exception, so I write below class and used Builder to build it could you please review it and ...
5
votes
3answers
896 views
Will multi-threading or other method make my program run faster?
I didn't use multi-threading so far as I didn't need to. But as far as I've read, implementing them will make my program slightly faster than it actually is.
...
0
votes
1answer
60 views
Thread safe log class which creates log files according to the current date when entry was added
From this question and some help I created a thread safe logging class on which the name of the log file is same as the current date (short date) when the log entry was added. e.g. If I create ten ...
5
votes
2answers
504 views
Thread safe logging class in C# to use from DLL
I tried to sample up a logging class from this question and answer(I want to use this class from C# DLL).
Made slight modification mainly to file name, and also how data is written.
I am interested if ...
3
votes
1answer
49 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 ...
4
votes
1answer
43 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
52 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
71 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
571 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
90 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
63 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 ...
10
votes
2answers
239 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
51 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
50 views
Producer-Consumer in C++ - follow-up
To expand from the changes supplied by the answer of my previous question:
...
6
votes
2answers
119 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
41 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
44 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
31 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 ...
7
votes
2answers
165 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
31 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
222 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
95 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
106 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
52 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
97 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
349 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
48 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
886 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
71 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
433 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
68 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
40 views
1
vote
0answers
32 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
82 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
74 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
85 views
3
votes
1answer
52 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
169 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 ...