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
Previous version was prone to the bug:
ruby-concurrency/concurrent-ruby#1075
This is particularly bad cause we could have a DB connection
attached to the thread and we never clear it up, so after N hours
this could start exhibiting weird connection issues.
Copy file name to clipboardexpand all lines: lib/ai_bot/response_http_streamer.rb
+7-9
Original file line number
Diff line number
Diff line change
@@ -8,21 +8,19 @@ class ResponseHttpStreamer
8
8
9
9
class << self
10
10
defthread_pool
11
+
# we use our thread pool implementation here for a few reasons:
12
+
#
13
+
# 1. Free multisite support
14
+
# 2. Unlike Concurrent::CachedThreadPool, we spin back down to 0 threads automatiaclly see: https://github.com/ruby-concurrency/concurrent-ruby/issues/1075
0 commit comments