No video

Introduction to Thread Locks in Python - Part#1

  Рет қаралды 1,920

CodersLegacy

CodersLegacy

Күн бұрын

In this tutorial we will introduce you to the concept of Thread Locks in Python, what they are, how they are used, and what problem do they solve for us.
Website Link:
coderslegacy.c...

Пікірлер: 11
@krzysztof7541
@krzysztof7541 2 ай бұрын
Very nicely shown thank you
@alanperrydaen9818
@alanperrydaen9818 5 ай бұрын
Thank you for this tutorial, which helped me a lot in understanding the locks in multithreaded programs
@denjiuzumaki4309
@denjiuzumaki4309 2 ай бұрын
great video!!!!
@coderslegacy5661
@coderslegacy5661 2 ай бұрын
Glad you liked it!!
@ReinventedWeb
@ReinventedWeb Жыл бұрын
Interesting topic. Nice video.
@surajbhattathiri
@surajbhattathiri 9 ай бұрын
very helpful
@astalavista5716
@astalavista5716 3 ай бұрын
So good. Anyhow I have an issue maybe someone can give me some hint . I have like 5 threads running in parallel. They all send signals via radio which turns on the power of a device for several seconds and finally turns it off . However I need kind of functions that almost let all processes to turn on and of in parallel. Eg Airpump runs every 5 min for 1min while 3 waterpump run 3 times a day for x amount of time and Moisture unit runs all 5min for 1 minute. How can I make sure that signals are not sent at same time but as close as possible according to the on and off signal? So the thread may run but the signaling send out should kind of queque
@coderslegacy5661
@coderslegacy5661 3 ай бұрын
Isn't that the point of locks though? So that even if they are sent at the same time, it will not matter. It will just wait until the resource is free. Even if you time the events close together, anomalies could occur which could cause the events to take longer/less time than usual. So timing events close together isn't a very foolproof solution.
@astalavista5716
@astalavista5716 3 ай бұрын
@@coderslegacy5661 thing is my thread may run but the signalaling function with a time sleep which is called in a function within the thread should be locked for the second and after the time sleep is over call the siignaling off of that unit. Meanwhihe in parallel other signals on and off may occur
@astalavista5716
@astalavista5716 3 ай бұрын
Just a simple example without syntax have 6 functions currently which are called from diffrent threads each for a power radio frequency Func1) Power on: XXXXXX1, puls: 302 - 303 Time.sleep(60) Power off: XXXXXX1, puls: 302 - 303 Func2) Power on: XXXXXX1, puls: 302 - 303 Time.sleep(180) Power off: XXXXXX1, puls: 302 - 303 … What I want is that the power for each power connector goes on for the amount of time but that the signal is send a second after each other . Same with the off signal at the end . So i always have a lock for on and of and in between the functions should run for the amount of time
@rahul_sreedharan
@rahul_sreedharan 6 ай бұрын
Hi
Non-Blocking Thread Locks in Python (Part#2)
8:06
CodersLegacy
Рет қаралды 871
What will he say ? 😱 #smarthome #cleaning #homecleaning #gadgets
01:00
Look at two different videos 😁 @karina-kola
00:11
Andrey Grechka
Рет қаралды 15 МЛН
Zombie Boy Saved My Life 💚
00:29
Alan Chikin Chow
Рет қаралды 24 МЛН
SAFE Multithreading with Mutex Locks
7:51
bvdl․io
Рет қаралды 3 М.
Locking & Synchronizing Threads in Python
10:18
NeuralNine
Рет қаралды 19 М.
XML & ElementTree  ||  Python Tutorial  ||  Learn Python Programming
10:30
Python Threading Examples - Issues and Caveats
54:00
MathByte Academy
Рет қаралды 3,8 М.
Python Threading Explained in 8 Minutes
8:39
NeuralNine
Рет қаралды 140 М.
Multiprocessing in Python: Locks
13:19
LucidProgramming
Рет қаралды 30 М.
threading vs multiprocessing in python
22:31
Dave's Space
Рет қаралды 575 М.
Python Tutorial 20: Understanding Python Threads and Threading
30:56
Paul McWhorter
Рет қаралды 18 М.
Python RLocks (Reentrant Locks)
8:31
CodersLegacy
Рет қаралды 865
What will he say ? 😱 #smarthome #cleaning #homecleaning #gadgets
01:00