On 01/25/2008 04:30 PM, Toshi Nagata wrote: > The problem seemed to be caused by the implementation of pthread in > OSX. It looks like OSX does not have PTHREAD_CANCEL_ASYNCHRONOUS cancel > type, although pthread_setcanceltype() does not result in an error. As a > workaround, I inserted calls to pthread_testcancel() here and there, and > now the cppunit test passes, and linuxsampler looks behaving better.
Hi, I came across this some days ago when I was hunting for memory leaks, and wondered why the asynchronous type was used. The case I was thinking about was that if the DiskThread can be canceled at any time, there's a (very small) risk for memory leaks when an Engine is deleted. So, to me it seems like a testcancel in at least the DiskThread is better than asynchrounus mode also for linux. > As a side effect, voice stealing now seems to be working correctly > (previously it was not working, presumably because the thread of the > running voice was not properly canceled). I don't think it's related. If I don't misunderstand the code there are no threads canceled by the voice stealing code. /Andreas ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Linuxsampler-devel mailing list Linuxsampler-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel