The Mighty Blog

Apr14

Written by:Will
4/14/2008  RssIcon

Here is something that was happening to me today when trying to spawn a new thread to perform some task...

To prefix this, we often run into instances in ASP.Net Programing, when we need to spawn a new thread to take care of some business while the original thread can continue serving the UI to the end user. 

This is normally not too complicated of a task, but when you don't use a specific methodology, some of its quirks or requirements can be forgotten.  For instance, I could not for the life of me get a new thread to compile.  I kept verifying with previously written code that I was doing it right.  And sure enough...  I was!  Yet I was still getting an error like this:

No accessible method '[METHODNAME]' matches the signature of delegate 'Delegate Sub ParameterizedThreadStart(obj As Object)'.

I kept pouring my eyes over the code.  Something MUST be different, but what?  Well, eventually, the train came tumbling in, and squished all of the blinding thoughts out and I was able to see clearly again.  I was calling a Function in the new thread statement, and not a Sub.  Duh!

Everything compiled and ran just fine after I changed the method to a Sub.

Strangely enough, I was not able to find any help when searching for it on Google.  All of the SERPs were for other situations where multithreading was not involved.


Your name:
Gravatar Preview
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Comment:
Security Code
CAPTCHA image
Enter the code shown above in the box below
Add Comment   Cancel 
Add to Technorati Favorites
Tweet about my blog
Will Strohl - The Mighty Blog - RSS Feed

Tag Cloud

Sort by:Tag | SizeRSS
camp   community   dnn   dotnetnuke   dotnetnuke®   event   example   free   get   group   integer   jquery   meeting   module   odug   orlando   search   session   think   use  
The opinions expressed here are the personal opinions of Will Strohl and do not necessarily represent the views and opinions of the DotNetNuke Corporation.
© Copyright 2004-2010 by Will Strohl. All rights reserved.Website Skinned By: Ralph Williams  Website Hosted By: Applied Innovations