<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 17, 2015 at 7:00 AM,  <span dir="ltr"><<a href="mailto:dancer-users-request@dancer.pm" target="_blank">dancer-users-request@dancer.pm</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
    delayed {<br>
      my $TextToWrite = ReturnText();<br>
      sleep(10); # Do something that takes a few seconds<br>
      content "$TextToWrite";<br>
      done;<br>
   };</blockquote></div>The sleep call will always cause blocking, even a sleep(0). Likewise a flush. In the sense that there is a context switch to some other thread or process.  <br><br>How are you testing whether it is blocking? Sorry, I do not know what you are trying to do.<br><br>Linux will not schedule a cpu intensive task to the exclusion of I/O. You can affect its scheduling using nice: <br><a href="http://stackoverflow.com/questions/2012852/control-a-perl-scripts-cpu-utilization">http://stackoverflow.com/questions/2012852/control-a-perl-scripts-cpu-utilization</a><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">If you really want nonblocking then you can look at nice for io<br><a href="http://linux.die.net/man/1/ionice">http://linux.die.net/man/1/ionice</a><br></div><div class="gmail_extra">or spawn a C program with pthreads and freeze your screen!<br></div><div class="gmail_extra">cheers -- Rick <br></div><div class="gmail_extra"><br></div></div>