On 05.12.2011 21:40, Tobias Pankrath wrote:
Right - thanks for the hint!
That would leave the following rules for real-time audio code in D:
[snip]
What's about message passing? Is message passing hard real time ready?
The issue actually came up for me a few weeks ago.
In principle, all you need are non-blocking queues to send messages to,
from or even between RT threads. With the atomic operations in D, such a
queue is fairly straightforward to implement.
Unfortunately, I could not find any OS support for non-blocking message
passing. More specifically, there does not seem to be any way to wake a
sleeping thread by sending a message from a RT thread. The only option
is periodically querying the message queue. Not optimal, but probably
sufficient for most purposes.