Click here to Skip to main content
15,912,400 members
Home / Discussions / C#
   

C#

 
GeneralRe: Updating the UI from a Rx background thread Pin
Kenneth Haugland21-Mar-16 20:24
mvaKenneth Haugland21-Mar-16 20:24 
AnswerRe: Updating the UI from a Rx background thread Pin
Kenneth Haugland21-Mar-16 23:07
mvaKenneth Haugland21-Mar-16 23:07 
AnswerRe: Updating the UI from a Rx background thread Pin
Kenneth Haugland22-Mar-16 23:56
mvaKenneth Haugland22-Mar-16 23:56 
QuestionIntermittent problem with design-time display of inherited UserControls in VS 2013 Pin
BillWoodruff19-Mar-16 4:36
professionalBillWoodruff19-Mar-16 4:36 
AnswerRe: Intermittent problem with design-time display of inherited UserControls in VS 2013 Pin
OriginalGriff19-Mar-16 5:23
mveOriginalGriff19-Mar-16 5:23 
GeneralRe: Intermittent problem with design-time display of inherited UserControls in VS 2013 Pin
BillWoodruff19-Mar-16 8:30
professionalBillWoodruff19-Mar-16 8:30 
Questionproblem asked in SIEMENS. Pin
Member 1240313019-Mar-16 0:27
Member 1240313019-Mar-16 0:27 
GeneralRe: problem asked in SIEMENS. Pin
Sascha Lefèvre19-Mar-16 0:32
professionalSascha Lefèvre19-Mar-16 0:32 
AnswerRe: problem asked in SIEMENS. Pin
Richard MacCutchan19-Mar-16 0:37
mveRichard MacCutchan19-Mar-16 0:37 
AnswerRe: problem asked in SIEMENS. Pin
Patrice T19-Mar-16 12:05
mvePatrice T19-Mar-16 12:05 
Questionsorting records in datagrid Pin
Engr. Yange18-Mar-16 20:05
Engr. Yange18-Mar-16 20:05 
AnswerRe: sorting records in datagrid Pin
Mycroft Holmes18-Mar-16 21:43
professionalMycroft Holmes18-Mar-16 21:43 
QuestionIs there a better way in Rx? Pin
Matt T Heffron18-Mar-16 13:06
professionalMatt T Heffron18-Mar-16 13:06 
AnswerRe: Is there a better way in Rx? Pin
Kenneth Haugland18-Mar-16 16:02
mvaKenneth Haugland18-Mar-16 16:02 
AnswerRe: Is there a better way in Rx? Pin
Kenneth Haugland20-Mar-16 18:56
mvaKenneth Haugland20-Mar-16 18:56 
Hmm, your question seems more and more important the deeper I look. The previous post is ok, it works and shows some nice things. But I read this post here:
StartNew is Dangerous[^]

And realized that I could probably do it a bit simpler with this call instead exchanging the default values at demand of course:
C#
Observable.Range(0, 10).
    Select(e => (Task.Factory.StartNew(() => DoWork(e),
                                            CancellationToken.None,
                                            TaskCreationOptions.DenyChildAttach,
                                            TaskScheduler.Default)))
    .ObserveOnDispatcher()
    .Subscribe(evt =>
    {
       //Do something with evt.Result
    });

But supposed I only wanted 5 parallel processes to run at the same time? How could I do that? I also seem to get the values once everyone is finished, and I'm currently not entirely sure what that is the case either.

I could also use the Observable.Start(()=>DoWork(e)) but the result in the subscriber seemed unusable to me, perhaps I mistook something here?
GeneralRe: Is there a better way in Rx? Pin
Matt T Heffron21-Mar-16 7:08
professionalMatt T Heffron21-Mar-16 7:08 
GeneralRe: Is there a better way in Rx? Pin
Kenneth Haugland21-Mar-16 7:47
mvaKenneth Haugland21-Mar-16 7:47 
GeneralRe: Is there a better way in Rx? Pin
Matt T Heffron21-Mar-16 9:53
professionalMatt T Heffron21-Mar-16 9:53 
GeneralRe: Is there a better way in Rx? Pin
Matt T Heffron21-Mar-16 7:10
professionalMatt T Heffron21-Mar-16 7:10 
QuestionX Number Of Results Per Line Pin
MadDashCoder18-Mar-16 11:16
MadDashCoder18-Mar-16 11:16 
QuestionRe: X Number Of Results Per Line Pin
CHill6018-Mar-16 11:50
mveCHill6018-Mar-16 11:50 
AnswerRe: X Number Of Results Per Line Pin
MadDashCoder18-Mar-16 12:44
MadDashCoder18-Mar-16 12:44 
AnswerRe: X Number Of Results Per Line Pin
Richard Andrew x6418-Mar-16 12:42
professionalRichard Andrew x6418-Mar-16 12:42 
AnswerRe: X Number Of Results Per Line Pin
Sascha Lefèvre18-Mar-16 14:45
professionalSascha Lefèvre18-Mar-16 14:45 
GeneralRe: X Number Of Results Per Line Pin
Brisingr Aerowing18-Mar-16 15:08
professionalBrisingr Aerowing18-Mar-16 15:08 

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.