Multithreading

Discussion in 'Site Programming, Development and Design' started by Bobter, May 16, 2011.

  1. Hi,

    I have some code that needs to go off and run on a seperate thread will the UI thread continues on showing pages to the user.

    It's working fine on my local machine but not once I put it up onto my Winhost account. Is it possible to run multithreaded code on Winhost?

    Rgds,

    Phil
     
    Last edited by a moderator: Oct 14, 2015
  2. Just to clarify, are you referring to the System.Threading namespace or are you using TPL? Whats the error message you are getting? Can you post your code?
     
  3. Yea, System.Threading. I think i've a bit more experimentation to do around this to make sure thats what I'm seeing. I'll get back to you, thanks.
     
  4. Ok, all signs are pointing to Threading not behaving like it does on my dev machine, which is fine, just wondering if there is something I can set on IIS to make it work the way I expect.

    Heres the code I'm using to kick off my seperate thread -

    Dim Thread As New Threading.Thread(AddressOf ReminderFunction.CheckReminders)

    Thread.Start()

    Nothing out of the ordinary there, the thread should go off and do some database operations but it doesn't even make it to the first one. Meanwhile the UI thread renders the first page but then I get a 500 error when I try to browse to anything else.

    Any suggestions?
     
  5. Open a support ticket and reference this post.
     
  6. Just FYI, I'm also doing multithreading and it works fine (hosted here)...
     
    Last edited by a moderator: Oct 14, 2015

Share This Page