From 09b0ec03cf10ea5e8d98abe88b8b405a235e33bc Mon Sep 17 00:00:00 2001 From: Theo Date: Sat, 8 Aug 2015 14:04:59 +0200 Subject: [PATCH] Add a warning of the use of non-single-threaded thread pools --- lib/ione/io/io_reactor.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/ione/io/io_reactor.rb b/lib/ione/io/io_reactor.rb index 9bfd623..476b406 100644 --- a/lib/ione/io/io_reactor.rb +++ b/lib/ione/io/io_reactor.rb @@ -25,11 +25,16 @@ module Io # reactor. A thread pool is any object that responds to `#submit`, takes a # block and returns a future which resolves to the value of calling the # block. It's completely up to the implementation when and how the block is - # called. The default implementation, simply calls the block immediately. + # called. The default implementation simply calls the block immediately. + # # The callbacks that are called in the thread pool are `Connection#on_data`, # `ServerConnection#on_data` ({BaseConnection#on_data}) and # {Acceptor#on_accept}. # + # If you provide a thread pool with more than one thread multiple chunks + # from the same connection can be processed in parallel, and it's up to you + # to serialize the processing per connection. + # # The IO reactor is completely protocol agnostic, and it's up to you to # create objects that can interpret the bytes received from remote hosts, # and to send the correct commands back. The way this works is that when you