Skip to main content
15 votes
Accepted

A new approach to multithreading in Excel

Interesting idea and well-done! Naming I really don't like the names. The names like clsMultiThread is somewhat misleading, since as you noted they don't actually ...
this's user avatar
  • 2,029
14 votes
Accepted

Asynchronous TCP server

This is an ugly old pattern. Why don't just try the newer async/await? You already use Task in your tests anyway. In order to ...
t3chb0t's user avatar
  • 44.3k
10 votes

Asynchronous Circular Buffer in C#

Quick Review An API like this, dealing with thread-sensitive operations, requires time and effort to test and review rigorously. When I will find this time, I will do a thorough review. But here are ...
dfhwze's user avatar
  • 13.9k
8 votes
Accepted

Using SendAsync to send multiple emails

From the SendAsync docs: After calling SendAsync, you must wait for the e-mail transmission to complete before attempting to send another e-mail message using Send or SendAsync. So no, this ...
RubberDuck's user avatar
  • 30.8k
8 votes

C++: algorithm that uses fixed-size buffer of data that are produced in stream, faster than the algorithm speed

Separate the data structure from the workers The class CSyncAlgo is doing way too much, making it harder to understand, and making it less flexible. I would start ...
G. Sliepen's user avatar
  • 58.3k
7 votes
Accepted

Login UI for an Android app

Using an AsyncTask instead would be much better. You've got many callbacks to the UI thread, all of this you could do in the post execute method instead: ...
Aritz's user avatar
  • 355
7 votes
Accepted

WPF Mvvm async function ViewModel

General Your model should not return an ObservableCollection because that collection should be used only if its change notification ability is needed (e.g. with ...
JanDotNet's user avatar
  • 8,538
7 votes

A new approach to multithreading in Excel

This is way above my expertise, but maybe adding an answer would cause more views/answers? Also, what's that beginner tag doing there? ;) I want to say first off, really solid work. That's probably ...
Raystafarian's user avatar
  • 7,159
7 votes
Accepted

Async friendly Timer

The API would really benefit from some inline documentation (///), but mostly looks good. Threading I'm no expert but it looks fine to me. The only thing that is ...
VisualMelon's user avatar
  • 7,431
7 votes

Monitor asynchronous tasks, tracking their running times

Ugly typedef I'm not a big fan of this: typedef std::future<int> FutureResultInt; It's not significantly shorter or easier to read, it doesn't isolate the ...
Toby Speight's user avatar
  • 76.9k
7 votes
Accepted

C# asynchronous notification vector

I don't think that screen space is so limited that methods can't be separated by a blank line, and separation makes it slightly easier to see scope. ...
Peter Taylor's user avatar
  • 24.1k
7 votes

Action queue manager to perform action in a FIFO fashion

EnqueueAction may want to throw an ObjectDisposedException if the queue is disposed, depending on the precise API you want. I ...
VisualMelon's user avatar
  • 7,431
6 votes

Calculating pi by adding areas of thin rectangles

I see a number of things that could help you improve your program. Don't abuse using namespace std Putting using namespace std ...
Edward's user avatar
  • 66.4k
6 votes
Accepted

HTTP downloader using Beast

Missing Headers Before going any further, the current code is missing a few headers that it needs, namely: <functional> and ...
D. Jurcau's user avatar
  • 3,010
6 votes
Accepted

C++ Wrapper for cURL: Multithreading and serializing asynchronous ops

Design Issue Creating a new thread for every connection is not a good idea. Creating a thread is expensive. Also a single thread can easily handle thousands of connections, so utilizing a single ...
Loki Astari's user avatar
  • 95.3k
6 votes
Accepted

Implementation of Asynchronous Cache

The way your code is today this should work fine. But if you ever decide to add a RemoveItem method you can have issues. Since you are checking if the key exist ...
CharlesNRice's user avatar
  • 4,408
6 votes
Accepted

Wordcloud from all answers of a user here on CR

Quick bits You have some issues that some linters would pick up: I would suggest moving your main code into a function. So that it doesn't pollute the global namespace. You've got some trailing ...
Peilonrayz's user avatar
  • 43.4k
5 votes
Accepted

MVC Async Action Invoking Workflow

I cannot believe this went unanswered for 5 and a half years (I guess I can, it is a difficult question to answer) - I'm going to try to answer it from the respect of early 2012, and the respect of ...
Der Kommissar's user avatar
5 votes
Accepted

TryRetry - Try, Catch, then Retry

I see 2 little issues with RetryLoop method. First, you check maxTries for an invalid negative value but I think that a 0 value ...
Rick Davin's user avatar
  • 6,360
5 votes
Accepted

Spawning futures as an alternative to multithreading

I see some things that may help you improve your code. Simplify your code using literals There is nothing intrinsically wrong with std::chrono::milliseconds(0) ...
Edward's user avatar
  • 66.4k
5 votes

Execute coroutines in pool

Making a pool of coroutines does not seem to be the way why we invented coroutines. Coroutines are meant to be lightweight, so that they can be created in very large numbers. Rather than limiting the ...
ospider's user avatar
  • 169
5 votes
Accepted

Using Task.Run(..) in a .NET property

You have just literally lost the async part of your ReadAsStringAsync method. By calling the Result property of your ...
bl4y.'s user avatar
  • 441
5 votes
Accepted

Running async tasks and cancelling after a timeout if necessary - follow up (1)

Looks good. One potential improvement is to make WaitAll method async. Maybe: ...
Nikita B's user avatar
  • 13k
5 votes

Fire same Task after 1 minute

Naming public async Task DoWorkAsync(CancellationToken token) DoWorkAsync is not a very expressive name. You should use a name that is more specific about what ...
t3chb0t's user avatar
  • 44.3k
5 votes

Javascript progress bar in succession

Your code already looks pretty clean. Good work! There are only a few things I would recommend changing. Don't define timings in CSS that should be defined in JavaScript. In this specific case using ...
Gerrit0's user avatar
  • 3,456
5 votes
Accepted

Retry cancelled tasks

Task is a reference type, so your copy will always be the same initial task, and when it is cancelled it will stay cancelled forever - see Restart a completed task. You can use Func instead of a Task ...
archnae's user avatar
  • 266
5 votes

Upload a file asynchronously

Seems a bit needlessly complicated and not exactly async at all. You're just forcing an async call to be synchronous with .Wait(). Proper way is to use async "all ...
Jesse C. Slicer's user avatar
5 votes
Accepted

Python: Asyncio object-oriented style

Old style declaration class Limiter(object): ... Using object as a base class is no longer necessary. Simply write: <...
AJNeufeld's user avatar
  • 33.7k
5 votes

Send multiple REST requests at the same time. (node)

When you have multiple asynchronous requests to make, and you want them to operate in parallel, usually the appropriate tool to use is Promise.all. You can use it ...
CertainPerformance's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible