logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
buffos  
#1 Posted : Thursday, May 27, 2021 4:41:57 AM(UTC)
buffos

Rank: Member

Groups: Registered
Joined: 5/9/2021(UTC)
Posts: 15
Greece
Location: Thessaloniki

Thanks: 2 times
Is it possible to run a script every time any input is push into program?

I know I can do that for every input, but is it possible to define global triggers?
doggy  
#2 Posted : Thursday, May 27, 2021 5:44:15 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,219
Belgium
Location: Belgium

Thanks: 293 times
Was thanked: 955 time(s) in 790 post(s)
Why not the opposite and let a script constantly poll for a change ?
buffos  
#3 Posted : Thursday, May 27, 2021 6:18:48 AM(UTC)
buffos

Rank: Member

Groups: Registered
Joined: 5/9/2021(UTC)
Posts: 15
Greece
Location: Thessaloniki

Thanks: 2 times
Originally Posted by: doggy Go to Quoted Post
Why not the opposite and let a script constantly poll for a change ?



This is indeed a solution. Just a CPU intensive one.
doggy  
#4 Posted : Thursday, May 27, 2021 7:39:10 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,219
Belgium
Location: Belgium

Thanks: 293 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: buffos Go to Quoted Post
This is indeed a solution. Just a CPU intensive one.


Very @@

and calling one isn't ?
buffos  
#5 Posted : Thursday, May 27, 2021 8:04:41 AM(UTC)
buffos

Rank: Member

Groups: Registered
Joined: 5/9/2021(UTC)
Posts: 15
Greece
Location: Thessaloniki

Thanks: 2 times
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: buffos Go to Quoted Post
This is indeed a solution. Just a CPU intensive one.


Very @@

and calling one isn't ?


If I understand correctly, you say have a script in a never-ending loop that checks if the program has changed and does what it needs to do.

This is definitely much more CPU intensive than an event-driven solution which runs what it needs to run only when an event occurs. (I guess this is what triggers do)


In an event-driven implementation, you have a single loop for the events that spawn registered callbacks.
doggy  
#6 Posted : Thursday, May 27, 2021 8:14:53 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,219
Belgium
Location: Belgium

Thanks: 293 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: buffos Go to Quoted Post


If I understand correctly, you say have a script in a never-ending loop that checks if the program has changed and does what it needs to do.

This is definitely much more CPU intensive than an event-driven solution which runs what it needs to run only when an event occurs. (I guess this is what triggers do)


In an event-driven implementation, you have a single loop for the events that spawn registered callbacks.


Frankly i don't care. Question was if it was possible and indeed there is a solution

How much CPU % will it add for the practical convenience ?

buffos  
#7 Posted : Thursday, May 27, 2021 8:20:39 AM(UTC)
buffos

Rank: Member

Groups: Registered
Joined: 5/9/2021(UTC)
Posts: 15
Greece
Location: Thessaloniki

Thanks: 2 times
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: buffos Go to Quoted Post


If I understand correctly, you say have a script in a never-ending loop that checks if the program has changed and does what it needs to do.

This is definitely much more CPU intensive than an event-driven solution which runs what it needs to run only when an event occurs. (I guess this is what triggers do)


In an event-driven implementation, you have a single loop for the events that spawn registered callbacks.


Frankly i don't care. Question was if it was possible and indeed there is a solution

How much CPU % will it add for the practical convenience ?




Sorry, the question was if there are global triggers.

A solution that will make the CPU jump to 100% (of the thread since I guess the execution is per thread)

Anyway. Thank you for your help.
doggy  
#8 Posted : Thursday, May 27, 2021 8:37:51 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,219
Belgium
Location: Belgium

Thanks: 293 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: buffos Go to Quoted Post

A solution that will make the CPU jump to 100% (of the thread since I guess the execution is per thread)


Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.