is d-runtime non-gc safe?

Norbert Nemec Norbert at Nemec-online.de
Fri Dec 9 00:04:09 PST 2011


On 07.12.2011 18:14, Sean Cavanaugh wrote:
> On 12/5/2011 3:22 PM, Norbert Nemec wrote:
>> 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.
>>
>
> In windows land you would use MsgWaitForMultipleObject on the sleepy
> thread and wake it up with a kernel object of some kind (an Event most
> likely)

How do you generate the kernel object? Is this operation non-blocking?


More information about the Digitalmars-d mailing list