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,039
11 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
  • 14.2k
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
  • 69.3k
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,309
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,591
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
  • 88.3k
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.5k
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,591
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,438
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
  • 44.6k
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

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,501
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

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

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
  • 35.3k
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
5 votes
Accepted

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

Your code boils down to just executing getGroups() in parallel with the getProfile()-...
Joseph's user avatar
  • 25.4k
5 votes
Accepted

Executing method with time limit restrictions

I did a little bit of cleanup. The CancellationTokenSource can take a TimeSpan, which you have in hand. Note also that it is an <...
Jesse C. Slicer's user avatar
4 votes
Accepted

Are there pitfalls to this solution to read messages from a queue in parallel?

Readability Use keyword var any time that the initialization of the variable clearly tells what the variable represents. Avoid abbreviations in variable names. <...
dfhwze's user avatar
  • 14.2k
4 votes
Accepted

Returning the results of four $resource calls as a JSON array in AngularJS

Never, and I mean NEVER, manually construct JSON. That's just asking for trouble. Construct the object then use JSON.stringify. FYI, arrays are valid JSON so you ...
Joseph's user avatar
  • 25.4k
4 votes

Nested loop with synchronous and asynchronous behavior

First you can make the database container more precise and accessible if you define it like this: ...
char bugs's user avatar
  • 171
4 votes
Accepted

SemaphoreSlim limit tasks

It seems you simply need process a fixed set of work items in parallel with a fixed degree of parallelism and in an async compatible way. Stephen Toub has written a very elegant way to do that in just ...
usr's user avatar
  • 745
4 votes

SemaphoreSlim limit tasks

Here's the extension method I've created. ...
Jay Shah's user avatar
  • 149
4 votes
Accepted

Fetching user details, posts, and comments using promises in ExpressJS

If you use 1 promise, you would encounter a long chain of then method and all of async operations would be executed in sequence style which increases response time. If you create 3 promises, all of ...
tanapoln's user avatar
  • 156
4 votes

Asynchronous File System Abstraction

Use an existing filesystem library You probably want to use the C++17 filesystem library. It is very close to what you have posted here. If you cannot use C++17, then use the Boost Fileystem library, ...
G. Sliepen's user avatar
  • 69.3k
4 votes
Accepted

Scraping urls asynchronous including exception handling

tasks = [] while urls: tasks.append(fetch(session, urls.pop())) can be largely simplified to ...
301_Moved_Permanently's user avatar

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