You're essentially using the IOBuffer to force sequentiality. Using a lock does this more directly.
On Wed, Feb 3, 2016 at 7:11 PM, Miguel Bazdresch <eorli...@gmail.com> wrote: > > What I did is that I have a Task that reads from the Pipe and puts the > data in an IOBuffer, then read from that in the loop instead, it seems to > work. > > That is what I do, with strings instead of IOBuffers. It does seem to work. > > -- mb > > On Wed, Feb 3, 2016 at 11:04 AM, STAR0SS <yu...@altern.org> wrote: > >> I have something of the sort: >> >> #some loop >> >> ... >> >> s = get_data_from_pipe() >> do_something_with(s) >> >> >> I need do_something_with to happen synchronously within the loop, so I >> cannot run that in a Task, and if get_data_from_pipe blocks then it kills >> my loop. >> >> What I did is that I have a Task that reads from the Pipe and puts the >> data in an IOBuffer, then read from that in the loop instead, it seems to >> work. >> > >