diff options
| author | Devendra | 2014-07-21 12:13:33 +0530 | 
|---|---|---|
| committer | Devendra | 2014-07-21 12:13:33 +0530 | 
| commit | ff904987dbd8167c5d10c717369260362fdb26b7 (patch) | |
| tree | f5e59ca132eaf274be8dfd24eb164d42c60cf6a4 /Pubnub.py | |
| parent | 1ecaa93e2ec929ca8ebc185dbdde46d649da7534 (diff) | |
| download | pubnub-python-ff904987dbd8167c5d10c717369260362fdb26b7.tar.bz2 | |
[fixes #74743948] added daemon flag, for core python pubnub class
Diffstat (limited to 'Pubnub.py')
| -rw-r--r-- | Pubnub.py | 4 | 
1 files changed, 4 insertions, 0 deletions
| @@ -1346,6 +1346,7 @@ class Pubnub(PubnubCore):          origin='pubsub.pubnub.com',          uuid=None,          pooling=True, +        daemon=False,          pres_uuid=None      ):          super(Pubnub, self).__init__( @@ -1372,12 +1373,14 @@ class Pubnub(PubnubCore):          self.latest_sub_callback_lock = threading.RLock()          self.latest_sub_callback = {'id': None, 'callback': None}          self.pnsdk = 'PubNub-Python' + '/' + self.version +        self.daemon = daemon      def timeout(self, interval, func):          def cb():              time.sleep(interval)              func()          thread = threading.Thread(target=cb) +        thread.daemon = self.daemon          thread.start()      def _request_async(self, request, callback=None, error=None, single=False, timeout=5): @@ -1397,6 +1400,7 @@ class Pubnub(PubnubCore):                                  callback=callback, error=error, timeout=timeout)          thread = threading.Thread(target=client.run) +        thread.daemon = self.daemon          thread.start()          def abort(): | 
