(2013-05-17 04:34)Bstrdsmkr Wrote: Can't you do something like this in a service?
Code:
import
while not xbmc.abortRequested:
xbmc.sleep(10000)
# At this point we know a shutdown has started so...
do_stuff()
Unfortunately not if you want to shutdown a service gracefully within 5 seconds (standard xbmc time out period). This affects all addons that are waiting for system resources like accept, socket stream i/o, rpc locks, file locks, pipe read/write, etc. I think that's the reason why most add-ons still are using poll loops (:shudder:
) instead if being event driven...(2013-05-17 06:25)garbear Wrote: But Bstrdsmkr, it's the principle that mattersSorry flyingrat, didn't get a chance to test it out today. I've already spent some time on this issue with the xbmc.Player callbacks, so I'd like to follow up and see if I can't figure out the abort problem also. I'll try to nail down the issue for good on Sunday.
No problem, i'm still fighting to figure out the root cause and a possible solution!
What was the problem with the xbmc.Player callbacks? Btw, i'm wondering if this might be a platform specific problem. I get this issue on osx so i'll try another platform on sunday. What platform are you on?

Search
Help