Final additions for TWBlue 0.50. TWBlue's source code has been frozen

This commit is contained in:
2014-12-11 10:03:02 -06:00
parent 4b98f27968
commit 9502cef251
11 changed files with 1088 additions and 682 deletions

View File

@@ -3,6 +3,7 @@ import threading
import wx
from twython import TwythonRateLimitError
import time
from pubsub import pub
def call_threaded(func, *args, **kwargs):
#Call the given function in a daemonized thread and return the thread.
@@ -19,3 +20,14 @@ def call_threaded(func, *args, **kwargs):
thread.daemon = True
thread.start()
return thread
def stream_threaded(func, *args, **kwargs):
def new_func(*a, **k):
try:
func(*a, **k)
except:
pub.sendMessage("streamError")
thread = threading.Thread(target=new_func, args=args, kwargs=kwargs)
thread.daemon = True
thread.start()
return thread