I'm writing a worker thread within my plugin which must wakeup each 1 minute to do some thing and then performs a sleep again. I have used the sleep routine within the function handled by the thread but th whole system becomes not stable.
Is there any other way to do this ?
Thanks for your help.
How to make thread doing a job each 1 minute in a plugin ?
Started by hyperonex, 25 Apr 2011 13:13
9 replies to this topic
Re: How to make thread doing a job each 1 minute in a plugin ? #2
Posted 25 April 2011 - 17:56
From the very limited information you have given us as to what exactly it is you are trying to do every 60 seconds, my guess is that your Plugin is hogging the system while it counts down each minute...
Why not CALL your task from a script via a cron job every minute? And use your Plugin just to turn the task On or Off by touching or removing a 0 byte 'flag' file in /var/etc for example?
But more info on what you are up to will definately help here, m8...
Cheers- AL
Why not CALL your task from a script via a cron job every minute? And use your Plugin just to turn the task On or Off by touching or removing a 0 byte 'flag' file in /var/etc for example?
But more info on what you are up to will definately help here, m8...
Cheers- AL
Re: How to make thread doing a job each 1 minute in a plugin ? #3
Re: How to make thread doing a job each 1 minute in a plugin ? #4
Re: How to make thread doing a job each 1 minute in a plugin ? #5
Re: How to make thread doing a job each 1 minute in a plugin ? #6
Re: How to make thread doing a job each 1 minute in a plugin ? #7
Posted 27 April 2011 - 09:44
my box is a dm500. I have reused the makefile for compiling plugins while changing the target to be a binary file instead of .so file but I get a segmentation fault when I try to run it on by box !!! (I have also removed the -shared link option from the makefile )
I need a makefile sample to compile my enigma1 program for a dm500 with open-pli as image.
Thanks
I need a makefile sample to compile my enigma1 program for a dm500 with open-pli as image.
Thanks
Re: How to make thread doing a job each 1 minute in a plugin ? #8
Re: How to make thread doing a job each 1 minute in a plugin ? #9
Posted 28 April 2011 - 08:45
In fact, I want to start program (the binary file) from my plugin. That's why first I need to compile my program and to test it on my box. Then I need to compile my plugin where I will launch my program through "system" function call.
The issue is that I can't compile my program without getting the segmentation fault when I try to run it. Hence I need a makefile sample leading to compiling a standalone program to be run on my dm 500 with open pli image. in other words assuming that I have developed an emu such as cccam and I want to compile it before putting it under /bin directory How I will compile it ?
The issue is that I can't compile my program without getting the segmentation fault when I try to run it. Hence I need a makefile sample leading to compiling a standalone program to be run on my dm 500 with open pli image. in other words assuming that I have developed an emu such as cccam and I want to compile it before putting it under /bin directory How I will compile it ?
Re: How to make thread doing a job each 1 minute in a plugin ? #10
Posted 28 April 2011 - 14:00
In the cdk tree we build some binaries like "setupnetwork" (I thought). You could check these makefiles and sources as an example.
Many answers to your question can be found in our wiki: http://openpli.org/wiki
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users