Click here to Skip to main content
15,347,207 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Getting stuck Pin
DRHuff17-May-21 8:11
MemberDRHuff17-May-21 8:11 
GeneralRe: Getting stuck Pin
Greg Utas17-May-21 8:58
mveGreg Utas17-May-21 8:58 
GeneralRe: Getting stuck Pin
raddevus17-May-21 12:35
mvaraddevus17-May-21 12:35 
GeneralRe: Getting stuck Pin
Rage17-May-21 21:00
professionalRage17-May-21 21:00 
GeneralRe: Getting stuck Pin
Slacker00717-May-21 6:23
professionalSlacker00717-May-21 6:23 
GeneralRe: Getting stuck Pin
honey the codewitch17-May-21 6:36
mvahoney the codewitch17-May-21 6:36 
GeneralRe: Getting stuck Pin
RickZeeland17-May-21 7:24
mveRickZeeland17-May-21 7:24 
GeneralRe: Getting stuck Pin
honey the codewitch17-May-21 7:48
mvahoney the codewitch17-May-21 7:48 
I wish I had worked with you this morning. I routinely code around that when doing process automation this way. I've run into it enough times that it's reflex. I even have some code around here on codeproject for it ... ah shoot it doesn't do what i remembered.

Oh well, here's a task wrapper around process capturing Adapting Event and Callback Based Asynchronicity to the Task Framework[^]

It's short and sweet.

Anyway, yeah you can't do things like ReadToEnd()... you have to buffer, but i almost always do reads incrementally so while I don't tend to code that way, i try to make my callable surface area as friendly as possible for something that does. Still, there's only so much you can do for that problem.

ReadToEnd() is a bad idea for a few reasons, some of which are circumstantial but some of which is that it can surprise you as it did here. Don't expect it to be better behaved on NetworkStream either, necessarily. It's easy as long as it works. When it doesn't it's monday. Big Grin | :-D
Real programmers use butterflies


modified 17-May-21 13:54pm.

GeneralRe: Getting stuck Pin
Gerry Schmitz17-May-21 8:08
mveGerry Schmitz17-May-21 8:08 
GeneralRe: Getting stuck Pin
honey the codewitch17-May-21 8:16
mvahoney the codewitch17-May-21 8:16 
GeneralRe: Getting stuck Pin
Rick York17-May-21 8:40
mveRick York17-May-21 8:40 
GeneralRe: Getting stuck Pin
honey the codewitch17-May-21 8:53
mvahoney the codewitch17-May-21 8:53 
GeneralRe: Getting stuck Pin
Matt Bond4-Feb-22 5:23
MemberMatt Bond4-Feb-22 5:23 
GeneralRe: Getting stuck Pin
honey the codewitch4-Feb-22 5:44
mvahoney the codewitch4-Feb-22 5:44 
GeneralRe: Getting stuck Pin
Rage17-May-21 21:01
professionalRage17-May-21 21:01 
JokeWinning the lottery will have consequences Pin
Cp-Coder17-May-21 3:30
MemberCp-Coder17-May-21 3:30 
GeneralRe: Winning the lottery will have consequences Pin
den2k8817-May-21 3:37
professionalden2k8817-May-21 3:37 
GeneralMother nature's jumper cables Pin
Cp-Coder17-May-21 3:25
MemberCp-Coder17-May-21 3:25 
GeneralWSO CC OTD 2021-05-17 Solution Pin
OriginalGriff17-May-21 1:45
mveOriginalGriff17-May-21 1:45 
GeneralRe: WSO CC OTD 2021-05-17 Solution Pin
pkfox17-May-21 1:58
professionalpkfox17-May-21 1:58 
GeneralRe: WSO CC OTD 2021-05-17 Solution Pin
OriginalGriff17-May-21 2:15
mveOriginalGriff17-May-21 2:15 
GeneralRe: WSO CC OTD 2021-05-17 Solution Pin
Greg Utas17-May-21 2:01
mveGreg Utas17-May-21 2:01 
GeneralRe: WSO CC OTD 2021-05-17 Solution Pin
OriginalGriff17-May-21 2:16
mveOriginalGriff17-May-21 2:16 
GeneralRe: WSO CC OTD 2021-05-17 Solution Pin
pkfox17-May-21 2:39
professionalpkfox17-May-21 2:39 
GeneralRe: WSO CC OTD 2021-05-17 Solution Pin
OriginalGriff17-May-21 3:35
mveOriginalGriff17-May-21 3:35 

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.


Straw Poll

You discover a sentient AI in your org's system. What do you do?
Well you never know what sort of orphaned projects previous employees have left behind...
  Results   593 votes