All Questions
Tagged with callback multithreading
12 questions
6
votes
2
answers
468
views
c++ multithreaded message broadcaster with link lifetime management v3
note: This is v3 of code that was previously reviewed.
I have written a class that handles listeners registering callbacks to receive messages. Link lifetime is managed (or is it? See below). Code is ...
1
vote
1
answer
106
views
c++ multithreaded message broadcaster with link lifetime management v2
note: This is v2 of code that was previously reviewed.
I have written a class that handles listeners registering callbacks to receive messages. Link lifetime is managed (or is it?). Code is ...
1
vote
1
answer
95
views
c++ multithreaded message broadcaster with link lifetime management
note: A version of this code without link lifetime management was previously reviewed. Adding lifetime management actually made the code simpler, and the class simpler to use.
I have written a class ...
1
vote
1
answer
1k
views
c++ multithreaded message broadcaster using callbacks
note: This is an updated design after a previous review round.
I have written a class that handles listeners registering callbacks to receive messages. Registered callbacks can be replaced or removed. ...
3
votes
1
answer
4k
views
C++ callback multithreaded, can unregister itself
update: a new version of this code is posted here
With this post, i would like to 1) ask for feedback on below code as it stands:
do i apply all best practices for c++20?
is it safe?
is my way to ...
3
votes
1
answer
125
views
Login system using callbacks in android
I wrote a login system for an app I am developing, but I'm not really happy with the code I have at the moment. I feel like there is a better way at tackling a problem like this. In particular I'm not ...
4
votes
1
answer
2k
views
It's Teetime; adding tee like functionality to Popen
I recently needed to run some command line applications from Python. Whilst this is fairly simple with subprocess.Popen. I wanted to be able to properly pipe the ...
13
votes
2
answers
5k
views
Implementation of a Thread Pool in C++
I wanted to implement a thread pool to test my knowledge of various modern C++ features. The end result could be better, but I need a review as I'm not sure about delicate things especially regarding ...
1
vote
2
answers
101
views
Class that provides callback execution at a specified rate
Here is a class I wrote to provide a user a way to have a callback function executed at some defined frequency:
Task.hpp
...
3
votes
1
answer
2k
views
Use callback style to start a worker thread and receive result in Qt
After using JavaScript for a while, I think callbacks are pretty good for asynchronous programming, but I haven't seen anything similar in C++. What I want to achieve is to start a worker thread from ...
5
votes
1
answer
913
views
"Piping" from a callback to an Iterator
My project has a central concept of a Callback<T> which is defined very simply:
...
36
votes
2
answers
6k
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 ...