Instantiating a System.Threading.Thread object in Jscript

Posted by user297029 on Stack Overflow See other posts from Stack Overflow or by user297029
Published on 2010-03-19T01:35:05Z Indexed on 2010/03/19 1:41 UTC
Read the original article Hit count: 519

Filed under:
|
|
|
|

I'm trying to create a new System.Threading.Thread object using Jscript, but I can't get the constructor to work. If I just do the following,

var thread = new Thread( threadFunc );

function threadFunc() {
    // do stuff
}

then I get error JS1184: More than one constructor matches this argument list.

However, if I try to coerce threadFunc to System.Threading.ThreadStart via

var thread = new Thread( ThreadStart(threadFunc) )

I get error JS1208: The specified conversion or coercion is not possible

Anyone know how to do this? It seems like it should be trivial.

© Stack Overflow or respective owner

Related posts about jscript

Related posts about threads