public IEnumerator _Thread(AsyncThreadDelegateFull threadCalAction, object param = null) { bool waitThreadFinish = false; var thread = new Thread(() => { Action customNext = () => { waitThreadFinish = true; }; threadCalAction(param, customNext); }); thread.Start(); KAsyncManager.Instance._threads.Add(thread); while (!waitThreadFinish) { yield return(null); } KAsyncManager.Instance._threads.Remove(thread); }
public CAsync Thread(AsyncThreadDelegateFull threadCalAction, object param) { return(Coroutine(_Thread(threadCalAction))); }
public IEnumerator _Thread(AsyncThreadDelegateFull threadCalAction, object param = null) { bool waitThreadFinish = false; var thread = new Thread(() => { Action customNext = () => { waitThreadFinish = true; }; threadCalAction(param, customNext); }); thread.Start(); CAsyncManager.Instance._threads.Add(thread); while (!waitThreadFinish) yield return null; CAsyncManager.Instance._threads.Remove(thread); }
public CAsync Thread(AsyncThreadDelegateFull threadCalAction, object param) { return Coroutine(_Thread(threadCalAction)); }