System.Speech.Synthesis中的.SpeakAsync(text) [英] .SpeakAsync(text) in System.Speech.Synthesis
问题描述
我想知道如何在不使用阻塞方法speak的情况下防止两个speakasync(text)一起运行.
I would like to know how to prevent two speakasync(text) from running together without using blocking method speak.
感谢您和最诚挚的问候
Edwin
推荐答案
感谢您在此处发布帖子,对您的回复表示歉意.
Thank you for posting here and sorry for late reply.
对于您的问题,不使用阻塞方法的含义是什么?
For your question, what does the without using blocking method mean?
您是不是要使用锁定和监控功能?
Do you mean you do not want to use Lock and Monitor?
您可以让线程等待事件 通过调用一个等待方法,例如, WaitOne , 或 WaitAll WaitHandle.WaitOne
You could make the thread to wait on events by calling one of the wait methods, such as WaitOne, WaitAny, or WaitAll. WaitHandle.WaitOne.
有关更多详细信息,请参阅MSDN文章.
https://msdn.microsoft.com/en-us/library/mt679037.aspx
如果您还有其他疑问,请随时与我们联系.
最好的问候,
温迪
这篇关于System.Speech.Synthesis中的.SpeakAsync(text)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!