Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi all,

In creating multithreading in the application, a lot of people would do somthing like this:

Dim Thread1 as New System.Threading.Thread(Address of counter.Count)

where counter.Count is a Timer, and what the code does is assign a timer in the entry point of a new thread and when the timer ticks, it goes to a place (usually a queue) to get the object and process it (Maybe I am wrong, let me know).

 

Now, my question is, instead of assigning a timer (or some function/subroutine that does not have a parameter) to the thread, can I assign a subroutine that has a parameter to a timer.

 

Thanks

Donald DUCK : YOU ARE FIRED!!!
  • Administrators
Posted
Although you can't assign a method that requires a parameter to a thread you can create an object that accepts either parameters for it's constructor or exposes them as properties and pass a method of the class to the thread constructor.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...