I've dug into this more, and it seems there's a third factor at work: conch.
In one of the functions called before this data is written, conch is shelling out to a command. Obviously it's also mucking around with stdin/stdout/stderr. Only when conch is called, is this error generated. Not shelling out makes the problem go away. So it's an interaction between pr-str, conch and/or clojure.java.shell, and Timbre-- all three of which are manipulating *out* which I'm guessing is not thread-safe. I don't know the solution yet but starting to understand the problem anyway. -ken -- ------- On Wed, Oct 07, 2015 at 11:45:02AM +0300, Atamert Ölçgen wrote: > So you actually want to print your data. I don't think it can be helped > then, two threads writing to the same buffer. I would have one of them use > a different buffer, write the logs to a file and tail it for instance. > > On Wed, Oct 7, 2015 at 11:36 AM, Ken Restivo <k...@restivo.org> wrote: > > > Yep. It doesn't help. > > > > I also tried (.flush *out*) before... no dice. > > > > -ken > > -- > > ----- > > On Wed, Oct 07, 2015 at 11:31:12AM +0300, Atamert Ölçgen wrote: > > > Hi Ken, > > > > > > Have you tried with-out-str? > > > > > > On Wed, Oct 7, 2015 at 11:18 AM, Ken Restivo <k...@restivo.org> wrote: > > > > > > > I was trying to save a data structure using prn-str. > > > > > > > > However, I'm also using Timbre for logging. > > > > > > > > My nice data structure is getting corrupted by INFO and DEBUG and other > > > > log messages from Timbre. > > > > > > > > Is there any way to turn a Clojure data structure into EDN without > > mucking > > > > around with things like pr-str that use *out*, which apparently is > > used for > > > > logging, among other things? > > > > > > > > -ken > > > > > > > > -- > > > > You received this message because you are subscribed to the Google > > > > Groups "Clojure" group. > > > > To post to this group, send email to clojure@googlegroups.com > > > > Note that posts from new members are moderated - please be patient with > > > > your first post. > > > > To unsubscribe from this group, send email to > > > > clojure+unsubscr...@googlegroups.com > > > > For more options, visit this group at > > > > http://groups.google.com/group/clojure?hl=en > > > > --- > > > > You received this message because you are subscribed to the Google > > Groups > > > > "Clojure" group. > > > > To unsubscribe from this group and stop receiving emails from it, send > > an > > > > email to clojure+unsubscr...@googlegroups.com. > > > > For more options, visit https://groups.google.com/d/optout. > > > > > > > > > > > > > > > > -- > > > Kind Regards, > > > Atamert Ölçgen > > > > > > ◻◼◻ > > > ◻◻◼ > > > ◼◼◼ > > > > > > www.muhuk.com > > > > > > -- > > > You received this message because you are subscribed to the Google > > > Groups "Clojure" group. > > > To post to this group, send email to clojure@googlegroups.com > > > Note that posts from new members are moderated - please be patient with > > your first post. > > > To unsubscribe from this group, send email to > > > clojure+unsubscr...@googlegroups.com > > > For more options, visit this group at > > > http://groups.google.com/group/clojure?hl=en > > > --- > > > You received this message because you are subscribed to the Google > > Groups "Clojure" group. > > > To unsubscribe from this group and stop receiving emails from it, send > > an email to clojure+unsubscr...@googlegroups.com. > > > For more options, visit https://groups.google.com/d/optout. > > > > -- > > You received this message because you are subscribed to the Google > > Groups "Clojure" group. > > To post to this group, send email to clojure@googlegroups.com > > Note that posts from new members are moderated - please be patient with > > your first post. > > To unsubscribe from this group, send email to > > clojure+unsubscr...@googlegroups.com > > For more options, visit this group at > > http://groups.google.com/group/clojure?hl=en > > --- > > You received this message because you are subscribed to the Google Groups > > "Clojure" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to clojure+unsubscr...@googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. > > > > > > -- > Kind Regards, > Atamert Ölçgen > > ◻◼◻ > ◻◻◼ > ◼◼◼ > > www.muhuk.com > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.