<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 30, 2015 at 12:11 PM, Xavier Mendez <span dir="ltr"><<a href="mailto:me@jmendeth.com" target="_blank">me@jmendeth.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hello,<br>
<br>
I'm wondering whether it's safe to do non-blocking reads or writes from inside the process callback.<br>
<br>
>From what I've seen, non-blocking I/O doesn't cause the process to go into blocked state, and the realtime scheduler should not switch to another process. But the documentation doesn't seem to allow them: <br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
> [...] it cannot call functions that might block for a long time. This<br>
> includes all I/O functions (disk, TTY, network), [...]<br>
<br>
So, is it safe to use non-blocking I/O in the process callback?<br>
<br></blockquote><div><br></div><div>Depends what you mean by safe. Unless you require quite low latency, for instance less than 256 frames, and if your program is not supposed to run simultaneously with hard realtime software such as ardour, calling I/O functions in the jack thread should work fine. But you need to inform your users that the program should not run simultaneously with hard realtime software.</div><div><br></div><div><br></div></div></div></div>