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)

3
votes
2answers
21 views

Thread Safe Servlet

I am working on a JSP MVC web application. I am confused about Thread-Safe Servlet concept. Following is my code, please tell me is it thread safe or not. Also, tell me the reason that why it is ...
0
votes
0answers
27 views

Multithreaded client socket

This is my first time working with networks and multithreading in C, and would like to know how to make improvements. I wanted to make a client program that handles reading and writing to the server ...
1
vote
0answers
38 views

Multiple Persons enter room simultaneously and exits after specific interval of time

Here is the link to git repo of my application I am currently implementing just to have better understanding of OOP as well as learning Concurrency (Atleast a try :D) What is the whole ...
2
votes
1answer
404 views

Thread class for exercises

I just felt a sting as for the first time, I copy-pasted code blocks, and made very little change to it, to overload it. It works fine, but I have 3 constructors that are basically copy-pasted. I'm ...
3
votes
2answers
65 views

Threadpool implementation in C++11

I am implementing a very primitive threadpool with C++11 using mutex and conditional variable. The class ...
2
votes
2answers
47 views

Creating a ticker thread - version 2

In this question, I asked for feedback on a class that provided my program with periodical signals. I have rewritten that class based on the feedback from the accepted answer. As this again uses a ...
3
votes
1answer
88 views

Java Multitasking (String concatenation)

I would like to know if I did everything right and if there a way to do it more simple? Task: Task link to html file My main: ...
-4
votes
1answer
58 views

Multithreaded AES encryption [closed]

I am trying to implement Lowering speed on my hybride encryption function for large files but can't seems to successfully bug fix a few issues. How do I deal with the while loop in this ...
3
votes
0answers
32 views

Producer Consumer in C

I'm doing multithreading at university and we've been asked to implement the producer consumer problem in C. My code compiles and produces the right result. From debugging it, it seems to be waiting ...
4
votes
0answers
41 views

Delete engine for deeply nested linked structure

The background is the question at http://stackoverflow.com/questions/36634394/nested-shared-ptr-destruction-causes-stack-overflow. To summarize, for a data structure that looks like: ...
4
votes
2answers
68 views

Play around with wait and notify

The following is an a self-tutored attempt to take a leap into understanding simple usage of wait() and notify() methods. The ...
2
votes
1answer
78 views

Creating a ticker thread

A new question about a revised version of the code in this question, based on the advice in the accepted answer can be found here. I need to signal my program to do something every X seconds. So I ...
2
votes
2answers
39 views

Copy directory to multiple directories - I/O performance matters

I am working on below python copy utility that should work on windows & linux, But I am looking for a more efficient approach that could optimize my I/O correction, as my target location is ...
1
vote
2answers
42 views

Spawning futures as an alternative to multithreading

I was trying to do a sample threading program, where the spawning of thread is in a while loop. I DO NOT want to generate multiple number of threads. The while loop should keep on running, ...
1
vote
1answer
27 views

Powershell task to poll SQL database for psexec commands to run

We have a requirement for a script which polls an SQL database for scrape commands which need to be run. These commands are added to the SQL database on an ad-hoc basis. The scrape commands themselves ...
1
vote
1answer
42 views

Multi-threading upload tool

We have about 14G files and each is about 150k. I'm writing a script to upload them to Azure Blob storage and would like to run an upload() function (each with own ...
0
votes
1answer
30 views

Design of thread pool reuse with Executors.newFixedThreadPool in Java

In my application I have code which should run every hour on a new items and execute some expensive operation with multithreading: ...
6
votes
1answer
44 views

Thread-safe algorithm to make trades based on moving window of prices

Here is problem to be solved TradingAlgorithm employs a trading algorithm which, based on the prices it receives, will return a trade to execute. The trading algorithm must implement the ...
2
votes
0answers
23 views

Memcached load generation

This is working but right now it is not giving me the throughput that I want. The main function has the load generation loop (where it is putting work in Queue). I ...
1
vote
1answer
49 views

Performance issue in generic sql utility

I recently working in .Net field and under circumstances had to write a program to execute sql from external source file.I have written the code and works fine but when it goes to Production server,It ...
5
votes
1answer
32 views

Fetch data from co-processor on network in background

My code communicates with a Raspberry Pi (with a static IP address) running on a network. The client sends a signal to the Pi, and the Pi sends back a double (encoded as a string) with the angle ...
7
votes
1answer
133 views

Lock-free multi-producer multi-consumer queue

I'm looking for some feedback on my lock-free queue, based on Disruptor, mainly for any potential concurrency issues, such as where I need additional fences. It looks correct to me, and I can't seem ...
3
votes
1answer
37 views

Run tasks in parallel using limited number of threads

To learn about concurrency in Clojure, I wrote a function that accomplishes the following: Takes a (possibly lazy or infinite) sequence of functions representing tasks to be run asynchronously Runs ...
3
votes
1answer
112 views

Initialize and sum an array in Java using threads

This bit of code initializes an array of any given size where each index corresponds to a thread and a value. That is, index 0 has 0, index 1 has 1, and so on. Then, the values, 0 to n, in the indexes ...
3
votes
0answers
58 views

Producer-consumer with a twist (consumer is a reader) in C++

Executive summary The twist is that the consumers do not consume, they just read. The producer makes items continuously in one of two alternating slots. Readers read from the other slot. When ...
-1
votes
1answer
31 views
0
votes
1answer
47 views

Long running in-process Publish/Subscribe class

I have a Pub/Sub class that will call Notify() when published and that Notify() could take around 10 seconds, so I need to make ...
3
votes
2answers
127 views

Queuing e-mail notifications in a background thread

I'm new to parallel programming concepts. I'm trying to implement fire-and-forgot kind of method in my project. Somebody please evaluate the below code & let me whether this is thread safe or not. ...
4
votes
1answer
47 views

Java NIO server Selector loop

I have a server that uses Java NIO in non-blocking mode. Right now I'm using a single thread for the selector, and four worker threads to process the bytes after ...
4
votes
2answers
223 views

Multiprocess, multithreaded read write on a single file

I've got a job to create a library that would be able to support multithreaded and multi process read and write to a single file. On that single file we would store C# models in an array in JSON ...
0
votes
0answers
31 views

Web scraper using Beautiful Soup

I am using Python 3 with Beautiful Soup to scrape web sites. I also used Thread to download images, but it will spend more than 30 minutes to get all information ...
0
votes
1answer
41 views

Custom concurrent stack implementation in Java

I don't want to use synchronized for sizeof method, any suggestion to implement the method thread safe? ...
3
votes
1answer
51 views

Thread pool using boost::thread

I would like to make a portable thread pool using boost::thread. Some one could tell me to look at boost::thread_group and ...
6
votes
1answer
77 views

Can my cache be more thread safe?

I have been working on a cache that can handle multiple reads at the same time, but the write is blocking. Is this code overkill by using both a ConcurrentHashMap ...
2
votes
0answers
18 views

Adaptive scan of function concurrently

This function try to scan the given function in n dimensions in the given range by adaptively divide the area into n+1 points polygon (e.g. triangle in 2D; tetrahedron in 3D) I tried to seperate the ...
0
votes
1answer
35 views

Loading message with Pthreads

I want to print a nice loading message with these three fading dots, while the main thread does some heavy IO stuff. This is why I implemented this: ...
2
votes
0answers
59 views

Blocking Memory Queue

This is a FIFO blocking memory queue in F# to be used as a component in a logging library. ...
4
votes
0answers
200 views

Cooperative multi-tasking / coroutine implementation

Here is my implementation of user-level cooperative threads in C++14, which I'm working on for a hobby project. It's not entirely finished but works pretty well so far. The target operating system is ...
2
votes
0answers
53 views

Parallel merge sort in Java

I have rolled my own parallel merge sort. My performance figures are as follows: Seed: 1457521330571 java.util.Arrays.sort() in 6840 ms. Sorted: true java.util.Arrays.parallelSort() 3777 ms. ...
4
votes
2answers
72 views

Terminal Chat Room

Summary I have written a pair of Perl scripts that form a UDP chat room allowing users to send messages over the internet with RSA encryption, making the messages imune to MITM attacks. The scripts ...
3
votes
0answers
37 views

Task scheduler with dependencies

I have need for a task scheduler determined by a directed graph. The tasks are held in a std::vector<task_type>, while the dependency graph is held in a ...
4
votes
1answer
68 views

Simple worker class

I just wrote a basic worker class for this person http://stackoverflow.com/questions/35827459/assigning-a-new-task-to-a-thread-after-the-thread-completes-in-c and I wanted to ask if the code has ...
7
votes
1answer
76 views

Simple Multi-Threaded Web Server

Need a way to test a web crawler. Threw together this web server that will replay previously saved pages from a real web server. Headers ...
3
votes
2answers
79 views

Parallel integer Quicksort in Java

Now I have that parallel Quicksort for (primitive) integer arrays. ParallelIntQuicksort.java: ...
3
votes
2answers
98 views

MultiThreaded TCP Server with high CPU usage

I wrote simple C# TCP Server application and my program use a lot of cup, i was wondering anyone can review my code and would be grateful for any hints and suggestion. This is my code. ...
5
votes
1answer
38 views

Parallel extension enchancement

As suggested in comments here I created a new topic for next version. I edited a bit original code, added exception processing and optimization, that first N = 1/core count tasks are processed on main ...
3
votes
1answer
54 views

Multiplying square matrix with C pthreads (POSIX threads)

I'm a student, and I'm trying to make the product of two square matrix with some threads in the soup. I've already worked on some fast single-threaded product (with some cache-friendly tricks), and ...
1
vote
1answer
49 views

Multithreading extensions

I created a following class to manage multithreading without extra overhead, which exist when I use Parallel TPL class. It is also useful for systems without ...
3
votes
2answers
76 views

Parsing HTML from multiple webpages simultaneously

My friend wrote a scraper in Go that takes the results from a house listing webpage and finds listings for houses that he's interested in. The initial search returns listings, they are filtered by ...
4
votes
1answer
90 views

Downloading files using Python-requests

I wrote a Python script to download files using multiple (source) IP addresses -- kindly suggest any improvements. ...