Threading Basics in C

preview_player
Показать описание
Learn the basics of threading in C with this sweet video.

Hope you enjoyed the video!

Check out this code here:

Join my Discord server to chat with me:

Check out some code on my GitHub:

Tweet me something funny on Twitter:

Say hi over at Facebook:

Sincerely,
Engineer Man
Рекомендации по теме
Комментарии
Автор

+Engineer Man awesome ...the only thing that is mostly absent on the web is good c tutorials ..make more of these

ScanWs
Автор

you should seriously do a c tutorial..you type it very fast and with confidence its great seeing you writing programs because you make it look easy.

cyberspek
Автор

I really appreciate that you don't waste time messing around, just get right into the meat and potatoes. Thank you.

Dan-codes
Автор

Short, straight to the point, no annoying music or endless introduction, good elocution at a good rate. I'd say perfection, but I don't want to give you the big head 😉

Thanks for your videos. If only youtubers would learn from you...

mrlucmorin
Автор

You're killing it man. Love these. Keep up the great work!

RussTeeTrombone
Автор

You taught me what my OS professor can't teach within 4 minutes. Nice video subscribed and liked

brogrammer
Автор

Awesome video. Can you please make one regarding thread synchronization using mutexes, spin locks, etc

ashwinnat
Автор

passing &num as an arg to pthread_create works fine with an integer (and probably other data types too), however it doesn't work when passing a char pointer (string), for anyone wondering how you'd do that, you would cast the char pointer to a void pointer when passing it to pthread_create() like the following: pthread_create(&thread, NULL, entry_point, (void *)example_string;

and you would cast it back to a char pointer once you're in the newly created thread like such:

void *entry_point(void *vptr_example_string)
{
char *example_string = (char *)vptr_example_string;
// now you can use the string here in the new thread
}

ChristopherGray
Автор

i love it but can you please show some example a bout threads please
like : how to iterate into an array or
how to append element of an array into pointer using threads
etc

lastsplasher_gore
Автор

Thank you for this. How about a threading tutorial in Gtk?

samjohnson
Автор

C don't have references. What you're passing in is the address of the said variable name.

taufiqsept
Автор

The video was very nice, short, and concise and I think you can go deeper into this topic. Like, what happens if we don't do pthread_join? Also, what happens if we are accessing a global variable in our thread and adding a value from memory that is constantly changing (race condition?)

kaushikdr
Автор

EM look a bit nervous, as I normally starts. And now he's is one of the mature Tech YouTubers :D

umairgillani
Автор

The third argument for the pthread_create should be a function pointer, not a function that returns int. What I mean is for example here number 1 is a function pointer not number 2 : 1) int (*func)(int, int) 2)int *func(int, int); and you used the 2nd one which is void *enterypoint (void *value); but I'm not sure so I'm asking :) because I know there is a different between 1 and 2

mahsatahmouresi
Автор

Hello all. entry_point expects a void pointer but it gets an integer pointer.. why doesnt the compiler complain?

alexpournaras
Автор

Hey great video. Just a stupid question: i am learning, so how can implement a thread if the function is using a boolean type? Any example, please?

ksp
Автор

Could you make a video about practical advantages of using threads, like a small example projet where threading is useful !!

mathssoso
Автор

Can someone explain to me the differencet between pointer and reference as thread parameter ? I looked it up in the internet but the things said were just a few and pretty hard to understand . I would appreciate it greatly :)

ivailomanolov
Автор

+Engineer Man do you know any good tutorials/explanations on how to use pointers/refs in c. I confuse them :(

zlovredniyTip
Автор

It's a universal truth that when you compile the first time you definitely forgot /n in at least one printf function you wrote xD

supernenechi