Юрій
no instance of constructor "std::thread::thread" matches the argument list c++
Anonymous
eg gist.github.com
Anonymous
#include <thread>
std::thread th1(LorisThread, s, socket_address);
Юрій
https://gist.github.com/Nelkmen/9499deb5e24afd135a775d04958affa6
Юрій
Anonymous
welp i found i hang that should not happen
[ RUN ] ExecutionManager_Core.init_2
STOP THREAD AND WAIT FOR CONTINUE: -1
thread with pid: 388322 created thread with pid: 388325
Anonymous
try int instead of void?
Anonymous
/get howtoprogram
Anonymous
/get best-book
Anonymous
welp, i guess i race can happen even between
int pid = ::clone(cloneArgs.fn, cloneArgs.child_stack, cloneArgs.flags, cloneArgs.arg);
int saved_errno = errno;
thread.pid = pid;
Anonymous
Anonymous
that is exactly how i learned :)
loads faster than reading a big book and forgetting half of what you read :)
Anonymous
/get best-book
try these :)
https://github.com/mgood7123/PDF/tree/master/C%2B%2B
Anonymous
oof
[ RUN ] ExecutionManager_Core.create_wait_for_exit
thread with pid: 486369 created thread with pid: 486370
CLONED
STOP THREAD AND WAIT FOR CONTINUE: 486370
CONTINUE THREAD: 486370
boo!
STOP THREAD AND WAIT FOR CONTINUE: 486370
CONTINUE THREAD: 486370
wait_for_state (pid 486369): unknown wait while waiting for state: STOPPED
THREAD INFO:
...
found in 13719 tries
Anonymous
glad i did not have to manually press
up
enter
13,719 times 😂😂😂
Anonymous
https://gist.github.com/5de091d0497b3f2912365d90da679173 is this too slow to be useful in debugging data races that can occur in extremely short periods of time (eg ~100ms) ?
Anonymous
Anonymous
https://gist.github.com/caed1168ee8ef5b609efb9c0a69ea92b *
Anonymous
how tf can this have failed?
kill(pid, SIGCONT);
waitpid(pid, &status, WCONTINUED|WSTOPPED) // hanged
Devjit
/rules
Anonymous
Hi everyone
Anonymous
Im beginner in programming
Just learn a bit C++
Heisenberg
Anonymous
I learn from youtube to use codeblocks
Anonymous
And have no idea in using visual studio..
Any advice for me to set up for C++?
Anonymous
Everytime i try to run there is always problem msg saying g++
Suka
Anonymous
Can you please explain?
Suka
Can you please explain?
sorry my mistake. this group have note on setup cpp for vscode.
#vscodesetup101
but as you can see i am having trouble fech the note hehehe
Anonymous
/get cpp-vscode
Suka
Anonymous
Anonymous
Okay will try
don't do it again
just read it, this is the note
Anonymous
Thanks
Anonymous
Hi its opening launch.json
Anonymous
Anyway, i think its gonna be wasting time for all of you, maybe is there any youtube tutorial that can be trusted?
Anonymous
Anonymous
And don't use YouTube to learn C++
Anonymous
Sorry mate but thats all i got, cause im trying to get back on my foot right now
Anonymous
Yusuf
/get imhacker
Anonymous
fk it didnt work
Yusuf
/get cbook
OnePunchMan
/get
Anonymous
Anonymous
Why?
Because there is no good "tutorials"
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Ow guys i need minGW
Anonymous
Anonymous
Then please do tell, im a beginner and this is my first time using C++
Anonymous
Anonymous
Ammar
I didn't examine your code carefully.
Anonymous
int wait(pid_t pid)
Anonymous
wait is a wrapper around waitpid
Ammar
int wait(pid_t pid)
I am unsure how can it compile, as I think it will conflict with wait from <sys/wait.h>.
Anonymous
i think it compiles via function overload
Anonymous
eg
pid_t wait(int *wstatus);
int wait(pid_t pid);
Anonymous
Ammar
Anonymous
im gonna upgrade it to std::optional<int> instead so i can distinguish between errors
Ammar
I don't really know which code is being waited. And how resources are managed. You need to explain more, so other can think of a solution.
Anonymous
im trying to recode wait
Pankaj
/get
Pankaj
/get
Anonymous
Anonymous