Creating and Using Threads
Important Points:
- We use the
Thread
class to create a new thread; - In order to pass a parameterless method into the thread class, we encapsulate it into a
ThreadStart
object. - A method with parameters can be executed by passing it into the
Tread
class after encapsulating it into aParameterizedThreadStart
object.
1. What constructor or method is used for creating a new method?
2. Which Thread constructor accepts a method with no parameters?
3. Which Thread constructor accepts a method with parameters?
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 3. Kapittel 2
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Awesome!
Completion rate improved to 3.7
Creating and Using Threads
Sveip for å vise menyen
Important Points:
- We use the
Thread
class to create a new thread; - In order to pass a parameterless method into the thread class, we encapsulate it into a
ThreadStart
object. - A method with parameters can be executed by passing it into the
Tread
class after encapsulating it into aParameterizedThreadStart
object.
1. What constructor or method is used for creating a new method?
2. Which Thread constructor accepts a method with no parameters?
3. Which Thread constructor accepts a method with parameters?
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 3. Kapittel 2