mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
Updated.
This commit is contained in:
parent
34ca5530b0
commit
8a979b3ada
@ -136,9 +136,9 @@ class RSS(callbacks.Privmsg):
|
|||||||
world.threadsSpawned += 1
|
world.threadsSpawned += 1
|
||||||
t.setDaemon(True)
|
t.setDaemon(True)
|
||||||
t.start()
|
t.start()
|
||||||
time.sleep(0.1) # So other threads can run.
|
|
||||||
finally:
|
finally:
|
||||||
self.locks[url].release()
|
self.locks[url].release()
|
||||||
|
time.sleep(0.1) # So other threads can run.
|
||||||
|
|
||||||
def _newHeadlines(self, irc, channels, name, url):
|
def _newHeadlines(self, irc, channels, name, url):
|
||||||
try:
|
try:
|
||||||
@ -146,6 +146,8 @@ class RSS(callbacks.Privmsg):
|
|||||||
# in this code at any given time. Otherwise, several announcement
|
# in this code at any given time. Otherwise, several announcement
|
||||||
# threads will getFeed (all blocking, in turn); then they'll all
|
# threads will getFeed (all blocking, in turn); then they'll all
|
||||||
# want to sent their news messages to the appropriate channels.
|
# want to sent their news messages to the appropriate channels.
|
||||||
|
# Note that we're allowed to acquire this lock twice within the
|
||||||
|
# same thread because it's an RLock and not just a normal Lock.
|
||||||
self.locks[url].acquire()
|
self.locks[url].acquire()
|
||||||
try:
|
try:
|
||||||
oldresults = self.cachedFeeds[url]
|
oldresults = self.cachedFeeds[url]
|
||||||
|
Loading…
Reference in New Issue
Block a user