README.md in swift-1.0.3 vs README.md in swift-1.1.0
- old
+ new
@@ -301,9 +301,29 @@
end
end
end
```
+### Fibers and Connection Pools
+
+If you intend to use `Swift::Record` with `em-synchrony` you will need to use a fiber aware connection pool.
+
+```ruby
+require 'swift/fiber_connection_pool'
+
+EM.run do
+ Swift.setup(:default) do
+ Swift::FiberConnectionPool.new(size: 5) {Swift::Adapter::Postgres.new(db: 'swift')}
+ end
+
+ 5.times do
+ EM.synchrony do
+ p User.execute("select * from users").entries
+ end
+ end
+end
+```
+
## Performance
Swift prefers performance when it doesn't compromise the Ruby-ish interface. It's unfair to compare Swift to DataMapper
and ActiveRecord which suffer under the weight of support for many more databases and legacy/alternative Ruby
implementations. That said obviously if Swift were slower it would be redundant so benchmark code does exist in