tillmo / raspi_lcd

Ruby bindings for the raspberry pi LCD interface
GNU Affero General Public License v3.0
2 stars 1 forks source link

the class should remove previous instances of itself #1

Open novia713 opened 10 years ago

novia713 commented 10 years ago

this class should remove or kill previous instances of itself because if you run twice some program that uses this class and push any button the LCD tries to answer repeated times causing a flickering in the display

i have used this software without noticing this problem quite time ago because i used to print always static text and, consecuently, the display didn't flick regarding the text is always the same but lately i'm displaying variable texts like CPU temperature and with this changing texts using several instances of the software the LCD flicks a lot

tillmo commented 10 years ago

I think rather than killing previous instances (which can be hard to recognize, since they are just ruby processes), I would introduce a lock, see e.g. http://stackoverflow.com/questions/9672343/how-to-limit-concurrent-instances-of-same-ruby-script or https://github.com/cleverua/lockfile or http://johnallen.us/?p=383

novia713 commented 10 years ago

yes, that would be great. given the lock, you would warn the user using several instances of the program would lead to naughty behaviour or recommend to kill the previous instance :) El 29/12/2013 21:49, "Till Mossakowski" notifications@github.com escribió:

I think rather than killing previous instances (which can be hard to recognize, since they are just ruby processes), I would introduce a lock, see e.g. http://stackoverflow.com/questions/9672343/how-to-limit-concurrent-instances-of-same-ruby-scriptor https://github.com/cleverua/lockfile or http://johnallen.us/?p=383

— Reply to this email directly or view it on GitHubhttps://github.com/tillmo/raspi_lcd/issues/1#issuecomment-31324988 .

tillmo commented 10 years ago

I think given an existing lock, a newly started instance should display a message and wait until the lock is released.

novia713 commented 10 years ago

that would be fine (:

-Leandro

IMPORT MY GPG KEY: gpg --keyserver x-hkp://pgp.mit.edu --recv-keys BA863309

2013/12/29 Till Mossakowski notifications@github.com

I think given an existing lock, a newly started instance should display a message and wait until the lock is released.

— Reply to this email directly or view it on GitHubhttps://github.com/tillmo/raspi_lcd/issues/1#issuecomment-31326617 .