当前位置:编程学习 > C#/ASP.NET >>

关于异步的问题

   private static void ForumThreadsMostRecentUpdate(ForumPost post)
        {
            ForumsDataProvider.Instance().ForumThreadsMostRecentUpdate(post);
        }

        private delegate void ForumThreadsMostRecentUpdateDelegate(ForumPost post);

        private static IAsyncResult BeginForumThreadsMostRecentUpdate(ForumPost post, AsyncCallback ac, Object state)
        {
            ForumThreadsMostRecentUpdateDelegate sender = new ForumThreadsMostRecentUpdateDelegate(ForumThreadsMostRecentUpdate);
            IAsyncResult result = sender.BeginInvoke (post, ac, state);
            return result;
        }


        public static void ForumThreadsMostRecentUpdateAsync(ForumPost post)
        {
            BeginForumThreadsMostRecentUpdate(post, null, null);
        }



---------------------------------------------------------------------------
最后调用ForumThreadsMostRecentUpdateAsync,并没有执行到ForumsDataProvider.Instance().ForumThreadsMostRecentUpdate(post);
不知代码哪里有问题
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,