NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 27 28 29 30 31 … 93 Next »
Plugin "cleanup" call on exit?

 
  • 0 Vote(s) - 0 Average
Plugin "cleanup" call on exit?
JohnInSJ
Offline

Member

Posts: 172
Threads: 31
Joined: Dec 2005
#1
2008-11-19, 02:09 PM
I've written a plugin that creates a background thread. It's causing a hangup (it seems) when the pvr app is exited - the gui goes away but I have to kill the process manually. I am assuming its hanging up waiting for my background thread to finish.

Is there something I should be looking for to know that the pvr app is exiting so I can kill my background thread? Is there a GBPVR.Public.EventTypes.??? that is sent? Are you tired of my questions yet? Smile

Yes, this is that activity monitoring plugin I've written, that I've not released since it is an experiment and (clearly, see above!) still has issues Wink
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#2
2008-11-19, 02:39 PM
Quote:Is there something I should be looking for to know that the pvr app is exiting so I can kill my background thread? Is there a GBPVR.Public.EventTypes.??? that is sent? Are you tired of my questions yet?
To be honest, I cant remember. I'm separated from my code for a few days, so cant check at the moment.
liteswap
Offline

Senior Member

Posts: 713
Threads: 70
Joined: Aug 2006
#3
2008-11-19, 03:58 PM
I've written something similar in AutoIt, to cope with the fact that, sometimes after standby, the PVRX2 UI (I'm using EVR on XP SP3 here) disappears although the process is still running. It's not very repeatable as it only happens about 75% of the time.

Hence the app. It checks for the existence of a Windows handle. If it doesn't find one but the process is still running, it kills the process and restarts.

If anyone else would find this useful, please say. However, I plan to incorporate the code into StartPVRX2, my app that keeps PVRX2 in focus, and restarts it if it crashes.
- Silent client PVR: HDPlex HS.1 aluminium fanless case / Thin-ITX ASRock H81TM-ITX motherboard / Intel Celeron 1850T CPU / 4GB RAM / 120GB SSD / TBS6982 DBS-S2 [SIZE=1]dual-tuner card / Win10+nPVR+Plex Media Player feeding LG OLED55B6V + Anthem MRX510 AV Receiver / PMC GB1 / B&W / REL speakers.
- Noisy NAS: Xeon / Intel mobo / 16GB RAM / FreeNAS + Ubuntu VMs on VMware ESXi + 12TB RAID
[/SIZE] running Plex Media Server

JohnInSJ
Offline

Member

Posts: 172
Threads: 31
Joined: Dec 2005
#4
2008-11-20, 12:19 AM
sub Wrote:To be honest, I cant remember. I'm separated from my code for a few days, so cant check at the moment.

No rush sub - just wondering, mostly. I'll see if there's anything I'm supposed to be doing in general that I'm not in the meantime.
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#5
2008-11-20, 12:29 AM
sub Wrote:To be honest, I cant remember. I'm separated from my code for a few days, so cant check at the moment.
I don't think there is unless you snuck it in. You were looking into adding this for me for Netflix a couple of releases ago, but since there was no adverse effect to just killing the download thread, setting isBackground=true on the thread was all I ended up needing. Maybe that's an option for John?
JohnInSJ
Offline

Member

Posts: 172
Threads: 31
Joined: Dec 2005
#6
2008-11-20, 01:17 AM (This post was last modified: 2008-11-20, 01:22 AM by JohnInSJ.)
Wow.. bingo!

Quote:A thread is either a background thread or a foreground thread. Background threads are identical to foreground threads, except that background threads do not prevent a process from terminating.

Lemme try that

Edit: Yep, bingo, it works great. Thanks whurlston, I did not know that little tidbit!
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#7
2008-11-20, 01:38 AM
JohnInSJ Wrote:Wow.. bingo!



Lemme try that

Edit: Yep, bingo, it works great. Thanks whurlston, I did not know that little tidbit!
I didn't either until sub told me about it. Big Grin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  API call for Recording Complete linustorvalds 1 273 2025-01-19, 02:11 PM
Last Post: mvallevand
  PIP plugin for Kodi sgilani 2 2,723 2022-10-17, 12:44 AM
Last Post: sgilani
  New Systems Plugin kirschey 10 3,292 2020-11-14, 08:01 PM
Last Post: sub
  API / web call for setting recordings Pbathuk 2 3,255 2018-01-13, 05:17 AM
Last Post: Pbathuk
  VIdeo playback from plugin mvallevand 5 3,421 2015-08-06, 10:43 PM
Last Post: sub
  Attention Sub: Open TV / Custom Data Grabber plugin Benoire 2 2,857 2014-11-14, 02:05 AM
Last Post: Benoire
  Web API call for Ready recordings? bgowland 2 1,856 2013-11-03, 12:43 AM
Last Post: bgowland
  API docs to help with plugin development? McBainUK 3 2,735 2013-06-08, 06:14 PM
Last Post: sub
  Refreshing TV Guide Data (after System plugin EPG update) imilne 13 6,027 2013-03-24, 08:03 PM
Last Post: imilne
  sabnzbd plugin to show processed files Wakalaka 1 1,931 2013-03-12, 06:48 AM
Last Post: psycik

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode