Re: [Jack-Devel] Non-blocking I/O in process callback

PrevNext  Index
DateMon, 30 Nov 2015 16:36:34 +0100
From Kjetil Matheussen <[hidden] at gmail dot com>
ToXavier Mendez <[hidden] at jmendeth dot com>
CcJACK <[hidden] at lists dot jackaudio dot org>
In-Reply-ToXavier Mendez [Jack-Devel] Non-blocking I/O in process callback
On Mon, Nov 30, 2015 at 12:11 PM, Xavier Mendez <[hidden]> wrote:

> Hello,
>
> I'm wondering whether it's safe to do non-blocking reads or writes from
> inside the process callback.
>
> 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:
>
> [...] it cannot call functions that might block for a long time. This
> > includes all I/O functions (disk, TTY, network), [...]
>
> So, is it safe to use non-blocking I/O in the process callback?
>
>
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.
PrevNext  Index

1448897800.13485_0.ltw:2, <CAC6niEKQPH6XG5HUFGpnVMhF1XP17iJs0NagoeNKqVQhVoz8rg at mail dot gmail dot com>