Click here to Skip to main content
15,900,258 members
Home / Discussions / C#
   

C#

 
QuestionPutting event handler codes inside DoWork delegate for asynchronous multi-threaded calculations Pin
Code4Ever15-Jul-22 18:35
Code4Ever15-Jul-22 18:35 
AnswerRe: Putting event handler codes inside DoWork delegate for asynchronous multi-threaded calculations Pin
OriginalGriff15-Jul-22 19:45
mveOriginalGriff15-Jul-22 19:45 
GeneralRe: Putting event handler codes inside DoWork delegate for asynchronous multi-threaded calculations Pin
Code4Ever15-Jul-22 19:50
Code4Ever15-Jul-22 19:50 
GeneralRe: Putting event handler codes inside DoWork delegate for asynchronous multi-threaded calculations Pin
OriginalGriff15-Jul-22 20:00
mveOriginalGriff15-Jul-22 20:00 
You can use any object - so an int, a MyClass, a collection of IEnumerable objects, an array ... literally anything you need to.

Just be aware that you are multithreaded so you need to ensure thread safety if the argument data is going to be even looked at by two different threads, and that Control derived classes can only be accessed from the thread that created them (the UI thread).
But you almost certainly knew that ... I added it for those other readers who are just getting started with threading.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!

GeneralRe: Putting event handler codes inside DoWork delegate for asynchronous multi-threaded calculations Pin
Code4Ever15-Jul-22 19:52
Code4Ever15-Jul-22 19:52 
GeneralRe: Putting event handler codes inside DoWork delegate for asynchronous multi-threaded calculations Pin
OriginalGriff15-Jul-22 20:02
mveOriginalGriff15-Jul-22 20:02 
GeneralRe: Putting event handler codes inside DoWork delegate for asynchronous multi-threaded calculations Pin
Code4Ever15-Jul-22 20:04
Code4Ever15-Jul-22 20:04 
GeneralRe: Putting event handler codes inside DoWork delegate for asynchronous multi-threaded calculations Pin
Richard Andrew x6417-Jul-22 4:00
professionalRichard Andrew x6417-Jul-22 4:00 
AnswerRe: Putting event handler codes inside DoWork delegate for asynchronous multi-threaded calculations Pin
Gerry Schmitz16-Jul-22 5:13
mveGerry Schmitz16-Jul-22 5:13 
AnswerRe: Putting event handler codes inside DoWork delegate for asynchronous multi-threaded calculations Pin
Richard Deeming17-Jul-22 20:55
mveRichard Deeming17-Jul-22 20:55 
QuestionDisposing issue when trying to load data from SQLite database Pin
Code4Ever14-Jul-22 20:22
Code4Ever14-Jul-22 20:22 
AnswerRe: Disposing issue when trying to load data from SQLite database Pin
Richard MacCutchan14-Jul-22 21:18
mveRichard MacCutchan14-Jul-22 21:18 
GeneralRe: Disposing issue when trying to load data from SQLite database Pin
Code4Ever14-Jul-22 21:30
Code4Ever14-Jul-22 21:30 
QuestionCould not Load type spride Pin
Luis M. Rojas7-Jul-22 4:58
Luis M. Rojas7-Jul-22 4:58 
AnswerRe: Could not Load type spride Pin
Pete O'Hanlon7-Jul-22 21:39
mvePete O'Hanlon7-Jul-22 21:39 
QuestionRe: Could not Load type spride Pin
Richard MacCutchan7-Jul-22 23:29
mveRichard MacCutchan7-Jul-22 23:29 
QuestionJSDOC '@extends' is not attached to class Pin
Luis M. Rojas4-Jul-22 5:00
Luis M. Rojas4-Jul-22 5:00 
AnswerRe: JSDOC '@extends' is not attached to class Pin
Pete O'Hanlon4-Jul-22 5:04
mvePete O'Hanlon4-Jul-22 5:04 
GeneralRe: JSDOC '@extends' is not attached to class Pin
Luis M. Rojas4-Jul-22 5:18
Luis M. Rojas4-Jul-22 5:18 
GeneralRe: JSDOC '@extends' is not attached to class Pin
Pete O'Hanlon4-Jul-22 19:55
mvePete O'Hanlon4-Jul-22 19:55 
GeneralRe: JSDOC '@extends' is not attached to class Pin
Luis M. Rojas5-Jul-22 2:33
Luis M. Rojas5-Jul-22 2:33 
AnswerRe: JSDOC '@extends' is not attached to class Pin
Richard MacCutchan4-Jul-22 5:49
mveRichard MacCutchan4-Jul-22 5:49 
QuestionVisual Studio Web Performance and Load Testing Tools alternative Pin
j11codep3-Jul-22 23:11
j11codep3-Jul-22 23:11 
AnswerRe: Visual Studio Web Performance and Load Testing Tools alternative Pin
Pete O'Hanlon3-Jul-22 23:54
mvePete O'Hanlon3-Jul-22 23:54 
GeneralRe: Visual Studio Web Performance and Load Testing Tools alternative Pin
j11codep4-Jul-22 0:18
j11codep4-Jul-22 0:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.