2 votes

Ball movement within an area

Edward has given a very good answer, and I agree with everything he said. However, he didn't address this issue: “You need to improve the usage of cv.wait() and ...
user avatar
  • 33.3k
2 votes

Ball movement within an area

I see a number of things that may help you improve your program. Don't abuse using namespace std Putting using namespace std at ...
user avatar
  • 64.4k
2 votes

A C++ Job Manager Class (Rev 1)

Pass functions by value You are passing job_func by rvalue reference, but that becomes a problem when someone has an lvalue ...
user avatar
  • 33.3k
1 vote
Accepted

Task executor thread pool

I am assuming this is not intended for serious use, as there’s no good reason not to use the tools already provided by Java for pooling threads made available in Executors. As I am not an expert in ...
user avatar
  • 6,211
1 vote
Accepted

NTP client displaying reference, originate, receive and transmit timestamps periodically with graceful shutdown in C#

Here are my observations DisplayNtpServerResponsePeriodically 0b00011011: I would suggest to move such magic number into a <...
user avatar
  • 5,760
1 vote

Multithreaded observer pattern in Rust

One issue is the type of your callback function: fn on_changed(&self, callback: fn(T)) -> std::thread::JoinHandle<()> { It is a ...
user avatar
1 vote

Thread-safe memoizer

For the posterity: Multiple fixes have been applied during the following years in the functools.lru_cache built-in memoize function (one example) CPython ...
user avatar
  • 111

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