How to make a very simple asynchronous method call in vb.net

前端 未结 4 1803
南方客
南方客 2020-12-30 05:17

I just have a simple vb.net website that need to call a Sub that performs a very long task that works with syncing up some directories in the filesystem (details not importa

4条回答
  •  时光说笑
    2020-12-30 05:41

    This is an older thread, but I figured I'd add to it anyway as I recently needed to address this. If you want to use the ThreadPool to call a method with parameters, you can modify @Timiz0r's example as such:

    System.Threading.ThreadPool.QueueUserWorkItem(Sub() MethodName( param1, param2, ...))
    

提交回复
热议问题