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

PrevNext  Index
DateMon, 30 Nov 2015 13:10:49 +0000
From Harry van Haaren <[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
Follow-UpXavier Mendez Re: [Jack-Devel] Non-blocking I/O in process callback
Hi Xavi,

If the time to complete the function is deterministic, it is real time safe.

System calls (blocking ones) have "unbounded execution time", and as such
are not rt safe.

If your I/O will take a significant amount of time, I suggest offloading to
a worker thread.

Hth, -Harry
On 30 Nov 2015 11:11, "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?
>
> Thank you,
> Xavi
> 
> Jack-Devel mailing list
> [hidden]
> http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
>
PrevNext  Index

1448889058.30558_0.ltw:2, <CAKudYbOREvmr+O1EHRYnmPOcMaXcbxhddwvaKg_LdwagqmvR9Q at mail dot gmail dot com>