Thread overview | |||||
---|---|---|---|---|---|
|
July 07, 2015 Lessons Learned: Writing a filesystem in D | ||||
---|---|---|---|---|
| ||||
https://www.reddit.com/r/programming/comments/3cg1r0/lessons_learned_writing_a_filesystem_in_d/ |
July 08, 2015 Re: Lessons Learned: Writing a filesystem in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Tuesday, 7 July 2015 at 21:41:47 UTC, Walter Bright wrote:
> https://www.reddit.com/r/programming/comments/3cg1r0/lessons_learned_writing_a_filesystem_in_d/
I run up against the same problem with threads when trying to play audio asynchronously - the callbacks are made from another thread which is created outside D. I solved it by disabling GC in callbacks that might invoke it, but it seems there's another solution to try out.
|
July 08, 2015 Re: Lessons Learned: Writing a filesystem in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Adrian Matoga | On Wednesday, 8 July 2015 at 13:08:08 UTC, Adrian Matoga wrote: > > I run up against the same problem with threads when trying to play audio asynchronously - the callbacks are made from another thread which is created outside D. I solved it by disabling GC in callbacks that might invoke it, but it seems there's another solution to try out. Why would such a callback need to allocate memory? For a similar project I used PortAudio with the D bindings [1]. In the callback, I just copy data from the D data stream to the port audio buffers and consume the copied data from the data stream. It works perfectly without any GC calls. [1] https://github.com/D-Programming-Deimos/portaudio |
Copyright © 1999-2021 by the D Language Foundation