You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The culprit is start_deferred_delivery_thread with the following code:
def start_deferred_delivery_thread #:nodoc:
Thread.new {
loop {
messages = [queue(:pending_messages).pop].flatten
messages.each do |message|
if subscribed_to?(message[:to])
deliver(message[:to], message[:message], message[:type])
else
queue(:pending_messages) << message
end
end
}
}
end
The loop has absolutely no sleep time and will run at max speed, continually dequeueing and queueing until there is no more CPU power left, then it keeps going until nothing else runs on your computer (unless you've got god/monit monitoring it) until the subscription actually occurs.
In my production environment, this is asynchronous, and can occur even upwards of days later, and I'd rather not have my CPU raped for that long.
The text was updated successfully, but these errors were encountered:
This is directly related to:
http://code.google.com/p/xmpp4r-simple/issues/detail?id=7#makechanges
The culprit is start_deferred_delivery_thread with the following code:
end
The loop has absolutely no sleep time and will run at max speed, continually dequeueing and queueing until there is no more CPU power left, then it keeps going until nothing else runs on your computer (unless you've got god/monit monitoring it) until the subscription actually occurs.
In my production environment, this is asynchronous, and can occur even upwards of days later, and I'd rather not have my CPU raped for that long.
The text was updated successfully, but these errors were encountered: