示例#1
0
        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);
        }
示例#2
0
 public CAsync Thread(AsyncThreadDelegateFull threadCalAction, object param)
 {
     return(Coroutine(_Thread(threadCalAction)));
 }
示例#3
0
    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);
    }
示例#4
0
 public CAsync Thread(AsyncThreadDelegateFull threadCalAction, object param)
 {
     return Coroutine(_Thread(threadCalAction));
 }