Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating a project that runs in its own thread
Message
 
To
20/08/2008 15:27:39
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01340388
Message ID:
01340526
Views:
8
>
>Thanks for your response as always. I may have to make some changes to the way I am doing this since I am using a singleton on this class. I probably don't need to since I now have a application property to get access. Here is my code now. Then to access this I just instantiate the class and call the MainEntry and that puts everything else into a seperate thread?


Pretty much. MainEntry() creates the new thread and does a callback into that same class, except it's running on a new thread. Just be aware that if you've got callbacks, events, etc. that they may not be happening on the thread you expect them to. Also, uncaught exceptions will kill the process, so you may want to wrap this stuff in a try/catch.

BTW - you can view what thread is currently active in the VS debugger. Depending on how VS is configured you may see it under View > Other Windows > Threads. In my case it wasn't originally there so I had to go into Tools > Customize > Commands > Debug > Threads and drop it onto the menu where I wanted it to appear. Then you can open another window which shows you the active and current threads.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform