This project is read-only.

Call a method asynchronously using STP

Feb 10, 2010 at 2:28 PM

Hi

I am using this code to call a method using ThreadPool:

 

public static void Process(string xm)
        {
            ThreadPool.QueueUserWorkItem(new WaitCallback(ExecInThread), xm);             

        }

        private static void ExecInThread(object xm)
        {
            try
            {

                    SaiBLL.localhost.Service s = new SaiBLL.localhost.Service();

                    s.Process(xm.ToString());

                     log(xm.ToString());

           }
            catch (Exception xcp)
            {
            }
        }

 

I am wondering how write the code using STP.

Thanks

N