Added a little locking, seems to have fixed the segmentation fault
This commit is contained in:
parent
45b374f24f
commit
b9965dc75c
|
@ -1,6 +1,7 @@
|
|||
# Python module that handles calls to the twitter API as a separate thread
|
||||
|
||||
import re
|
||||
import gtk
|
||||
from threading import Thread
|
||||
|
||||
class GetTweets(Thread):
|
||||
|
@ -44,7 +45,11 @@ class GetTweets(Thread):
|
|||
else:
|
||||
statuses = results_to_statuses(self.api.Search(self.list_name, rpp=self.num_entries))
|
||||
|
||||
gtk.gdk.threads_enter()
|
||||
try:
|
||||
self.pane.update_window(statuses)
|
||||
finally:
|
||||
gtk.gdk.threads_leave()
|
||||
|
||||
print 'debug: GetTweets.run(): finished'
|
||||
|
||||
|
|
|
@ -446,5 +446,6 @@ parser.add_option('-c' ,'--config', dest="filename", default="~/.mytwitter.conf"
|
|||
(options, args) = parser.parse_args()
|
||||
|
||||
my_twitter = MyTwitter(options.filename)
|
||||
|
||||
gtk.gdk.threads_init()
|
||||
gtk.main()
|
||||
|
|
Reference in New Issue
Block a user