lib/sup/sent.rb in sup-0.13.2.1 vs lib/sup/sent.rb in sup-0.14.0
- old
+ new
@@ -23,11 +23,16 @@
@source_uri = @source.uri
@source
end
def write_sent_message date, from_email, &block
- @source.store_message date, from_email, &block
- PollManager.poll_from @source
+ ::Thread.new do
+ debug "store the sent message (locking sent source..)"
+ @source.poll_lock.synchronize do
+ @source.store_message date, from_email, &block
+ end
+ PollManager.poll_from @source
+ end
end
end
class SentLoader < MBox
yaml_properties