Tagged Questions
3
votes
1answer
47 views
An async_group class to gather futures and clean them periodically
Here the short story. I have a listener on a queue which sends me several jobs. Each job is launched in a thread and takes different times to finish. I have two main constraints :
I want to retrieve ...
9
votes
1answer
136 views
Lightweight asynchronous event library in C - Threadpool module
I have finished writing a C library whose purpose is to provide a simple API for asynchronously executing functions, waiting for events on file descriptors and waiting for timeouts. The whole library ...
2
votes
0answers
35 views
Asynchronous service that publishes a possibly infinite amount of events
I want to implement a service that fetches eyetracking events and publishes them to all subscribers of the stream. The whole thing is supposed to run asynchronously, so it doesn't block the UI thread. ...
3
votes
1answer
57 views
TCP retarder for network delay simulation
I would like to simulate delay over network, for that I have implemented a simple retarder (=introduce random delay while maintaining order of messages) using Boost to handle sending itself. It ...
4
votes
2answers
292 views
C++ Wrapper for cURL: Multithreading and serializing asynchronous ops
I did this library to help me from one of my projects and decided to publish it on GitHub hoping people might find it useful, convenient and easy to use in their projects too.
It's a header-only ...
2
votes
1answer
366 views
Simple multi-client echo server
I've been looking at some async comms in C#. As a proof of concept, I've written a simple multi-client echo server. The server allows multiple TCP clients to connect and listens for input from the ...
3
votes
1answer
54 views
Make one greenlet tell another to shutdown
I am building a commandline app to check proxies, which has a daemon flag (running forever or just once).
There are producers, checkers and storers. I want them to run in parallel and be able to ...
1
vote
2answers
151 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, ...
0
votes
1answer
90 views
3
votes
2answers
151 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.
...
19
votes
3answers
2k views
Synchronous / asynchronous REST client
I have working code with original design, and now I had a slight design change so trying to code review that as well. I already had code review on my original design here.
Original Design:
I am ...
2
votes
1answer
159 views
Multithreading, shared queue as synchronization point
I have two threads, one produces images and one processes them. For the synchronization, I created a class where you can set and get images, and it always waits until an image is available or a worker ...
7
votes
2answers
1k 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 ...
10
votes
2answers
2k 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 ...
0
votes
2answers
2k views
Uploading a file asynchronously
I've been experimenting with some old code that needs refactoring in places and was testing if there was any improvement to iis threads etc by uploading file asynchronously (Server Side). I'm using ...
1
vote
0answers
565 views
Asynchronous execution
I needed several classes with methods performing network requests which should be executed asynchronously (with callbacks). To get rid of repetition, I added a mixin and a helper class:
...
10
votes
2answers
2k views
Having sync and async methods by implementing future interface
I need to make a library in which I will have synchronous and asynchronous methods in it and this library will be used by our customer in our company. Some customer will call the ...
7
votes
1answer
608 views
Lock Using “Interlocked” vs lock Statement (“Monitor”) (Followup)
This is a followup to a previous question.
Considering:
Interlocked.CompareExchange generates a memory barrier,
Intended to be used with very fast operations (...
4
votes
2answers
2k views
Lock Using “Interlocked” vs lock Statement (“Monitor”)
A followup question can be found here, based on this question and it's answer.
Considering:
Interlocked.CompareExchange generates a memory barrier,
Intended to be ...
2
votes
1answer
991 views
TCP Server with multithreading
I am working on a banking application. I want to create a multithreaded TCP Payment Card (iso8583) server that can handle passbook printing requests simultaneously. Multiple devices are connected to ...
5
votes
2answers
174 views
Validating asynchronous behavior
I have a large service application I designed; it's a solution made up of about 30 projects.
I was wondering if anyone could point me in the right direction regarding using the Task-based ...
1
vote
1answer
417 views
Async function with slow web reference(web service) slowing down webpage
Is there a way to make a threading/async post with a web reference not slow down the whole website just because the web reference takes a long time to return a response?
I have a send email function ...
3
votes
2answers
220 views
Asynchronous Pattern
I have an n-tier solution which consist of DAL,BL and a ASP.net WebAPI project. I'm new with Asynchronous Pattern and I'm trying to add it to my Framework. Am I doing asynchronous pattern correctly? I'...
4
votes
1answer
3k views
simple ThreadPool implementations
I would like to ask you for a code review of my c++11 Thread Pool implementation. Your constructive criticism is welcome! Could you give me some ideas how to extend it?
The main idea is to ...
3
votes
0answers
92 views
5
votes
1answer
1k views
Asynchronous Server Sockets - Thread-Safety/Performance (MMO Gaming)
I'm writing this game server for my small 2D MMO game.
So here are my questions:
What do you think about the Thread-Safety of the code?
Please explain how can it be made thread-safe / show example/ ...
4
votes
3answers
4k views
Asynchronous version of AutoResetEvent
This is my second attempt to create asynchronous version of AutoResetEvent.
At first I tried to make it completely lock-less, but it turned out to be impossible.
This implementation contains a lock ...
4
votes
1answer
32k views
Correct approach to wait for multiple async methods to complete
I have an IWorkflow interface defined as follows:
...
3
votes
1answer
689 views
Very simple async MixpanelAPI
I would love to hear feedback on my first open source project (a very simple async API for Mixpanel).
It implements a REST client for this REST HTTP API.
Review requested on the following aspects:
...
8
votes
4answers
4k views
Code works but memory usage is erratic
I have the following class which is a tool for retrieving MD5 hashes of files that are input into it. They can potentially be very large files and I require cancellation and progress report, hence why ...
28
votes
2answers
3k views
Asynchronous network callback code
I did not get the job after submitting this piece of work in an interview, but I have no feedback to know what "BAD" things are inside this block of code.
The requirements are:
Connect to the ...
2
votes
1answer
2k views
Is this a safe/correct way to make a python LogHandler asynchronous?
I'm using some slow-ish emit() methods in Python (2.7) logging (email, http POST, etc.) and having them done synchronously in the calling thread is delaying web requests. I put together this function ...
6
votes
2answers
12k views
Asynchronous Sockets
I need to implement a TCP client application. The client and the server send messages to each other. I want to make this program scalable enough to handle connections to multiple servers at the same ...