Комментарии:
Hello
I'd like to report that the code did not work with me but I had to edit on the function declaration
void* routine(void* n)
{
}
This worked fine with the pthread_create
Is there any difference between posix threads & thread from std namespace?
Like performance or user friendly?
How to decide which one to use and when ?
Hi Sir,
could you please tell again how this if condition make safer our code and didn't understand this condition "!=0 " . Please reply anyone.
This is helpfull, thank you I will watch it all. I have have a question, I'm learning Go it has routine, does it similar to thread in c? (because Go was build base on C, I believe)
ОтветитьThis course is a Mine gold 🏆, i promote every time in my yt channel!!!
Ответитьjust took a year off from my degree and completely forgot about how to use P_threads and this basically caught me back up to speed, incredibly good explanation.
Ответитьit's much more clear than my professor, thank you!
ОтветитьI can`t find right words to fully express how simple and great this lesson starts thread theme... like u`ve said that I`d heard, read, seen so many times, but in an absolutly clear way and now I`m starting to feel that threads aren`t that scary and wierd - thank u soooo much!👍
ОтветитьBinging your videos like I binged Money Heist!! literal Bella Ciao feeling in my mind for my C rejuvenation!!
Ответитьthank you so much <3
ОтветитьThanks for tutorial!!! One comment (unless I am wrong): it would make it cleaner to return NULL in all the void* functions
ОтветитьGreat video! Could you tell us what VSCode extension you are using for function descriptions when you hover over them? Thanks!
ОтветитьI saw in a tutorial comparision between user level threads and kernel level threads that Multithreading isn't possible in user level threads. First , I would like to make sure and classify the threads that we are creating here . They are probably user level Threads because according to their definition they are created by the user just like we did here. But the thing that I don't understand is , how multithreading not possible user level Threads? Isn't that we did in our case executing two threads end getting same output twice called multithreading?
ОтветитьAs a little update: in the "void routine()" function you should add the parameter void *arg so there won't be any errors: void *routine(void *arg){...}
ОтветитьWhat I have understood about the function pthread_join() is that , it waits until the thread passed in its first argument is terminated. That logically means that removing the call of this function doesn't stop the thread from executing, because that's the job of the pthread_create() function . But when I tried so and removed the call of the pthread_join() function I didn't get an output, which means the thread t1 didn't execute. Why?
ОтветитьThank you!
ОтветитьDude u are very good I like your classes, thx for the content It will be such a greate help for me
ОтветитьHow do i prevent memory leaks in Pthreads? The first time i execute the program, answer is right but if i add a while loop, it is providing incorrect values.Even after adding pthread_join, same thing is happening.
ОтветитьThese videos are absolute gems, huge thanks from Hong Kong!
Ответитьthank you so much this really helped me a lot!!!
Ответитьtop!
ОтветитьIdk why but when I'm using sleep()
It is not stopping there :(
Plz help
i love you so muccchhhhh codevault <3 hugs from ecole 42
ОтветитьMany thanks!
Ответитьthank you, thank you, thank you 🚀🚀
ОтветитьI know you get this a lot, but your videos on C are a godsend! You've really helped me and countless others to succeed in our education.
ОтветитьGreat explanation! thanks very much
ОтветитьHow to print process Id and thread id knowing that threads are executing within the same process
Ответитьsorry, why the function has a pointer?
Ответитьthank you for the series I passed my exam on the second try after watching your videos, our professor didnt explain it well
ОтветитьHow can I join to your Discord server?
Ответитьhello, everytime i got the learn somethings new for a project at 42, you are here with a video. the starting point for philosophers :) Are you a 42 students ? thanks you for all your stuff :)
Ответитьyou are better than most of professors teaching c in china
Ответитьis it possible to give a thread a timeout, so if my function is not done executing in some time ebcause it is hanging or something, have the thread return
ОтветитьGreat video thanks. Can you please help explain why you only wrote if statement in pthread_create and pthread_join, but no else statement? I understand if pthread_create doesn't return 0 then it's an error, but I'd think there needs to be an else statement to tell the program what to do when there is no error.
ОтветитьHi, I am using Ubuntu 20.04.4 LTS. On VSCode I can't include the header <pthread.h>, only <threads.h> works. I can locate pthread.h in /usr/include/pthread.h. How do I include the header in VSCode?
Ответитьyou are a life saver
Ответитьcan you please make a video about sockets? my final exam is coming up and I have no idea how they work !!
ОтветитьGood morning. Do you have a video explaining function that return void *?
Ответитьwhat is the API you talked about ? I've been searching in Google - can you help me with it ?
ОтветитьI've tried adding pthread in tasks.json but it just doesn't seem to work when I run the program using vscode.
It works through the terminal but not vscode. It still gives the undefined reference error. Is anyone able to help?
How do you get VS code to show the pop up with the different arguments, for things such as pthread_create?
ОтветитьAmazing teaching !
Ответитьunderstood
Ответитьnice and clear explanation!
ОтветитьTaking an Operating systems class, and you have been a great help throughout the course!
Ответитьwhere are you from?
ОтветитьThank you! But is this only for Linux? Does it work in Windows as well?
ОтветитьThank you sir, your videos are really very helpful for me.
Ответить