Fork me on GitHub
#yada
<
2018-10-24
>
OliverM07:10:23

Thanks @malcolmsparks I’m really interested in how it might work as the main bus of an application. I’ll give it a go myself and see what comes out.

borkdude09:10:57

Made a branch of yada with speculative tests. Found no errors. https://github.com/borkdude/yada/tree/speculative-tests

👍 4
stijn13:10:51

if I want to use something that needs a java.io.Writer to create the body for a yada response, what is a good way to do this (i.e. what type of 'thing' do I write to? does yada e.g. create content from an OutputStream. what should I do to make sure the writer doesn't get closed before the request is returned?) Or is it just easier to use (with-out-str (write-the-thing *out*))?

mccraigmccraig14:10:23

@stijn you could give it a java.io.StringWriter too - presumably you are going to call this thing on a manifold.deferred/future ?

stijn15:10:35

that might indeed be a problem on a different thread

stijn15:10:25

@mccraigmccraig but what about the with-open that's usually used for this kind of writing. does that work with futures?

mccraigmccraig15:10:51

it doesn't matter for a StringWriter - it doesn't actually hold any i/o resources open - if it were something like a FileWriter with a file-handle though you could use with-open inside the body of the future