From my Scala code, I'm calling a Java library that blocks to download a document & parse it. Let's assume it's unreasonable to re-write the library.
The scala method's signature is: `def f: Int` (let's say that it downloads the library & returns an integer for failure or success - not a very good design, I'd say, but let's go with it).
Since the Java library is blocking, is there any value in wrapping this synchronous operation with `Future`'s? In particular, I'm thinking about how I'm going to call this `f` method from my `spray http` web service.
My concern is that, when I call this method in a spray route, will the web service only be able to handle 1 request per time if the java library is blocking?
--
You received this message because you are subscribed to the Google Groups "spray.io User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spray-user+...@googlegroups.com.
Visit this group at http://groups.google.com/group/spray-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/spray-user/6098beba-52ed-4e5e-8987-a7c81e365894%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
could you please recommend any reading on bulkheaded dispatcher? or maybe even some code demonstrating how to address my situation with blocking?
thanks