Click here to Skip to main content
14,325,129 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: whoa, another reason to use keep-alive Pin
lopatir6-Sep-19 0:28
memberlopatir6-Sep-19 0:28 
GeneralRe: whoa, another reason to use keep-alive Pin
Jörgen Andersson6-Sep-19 1:25
protectorJörgen Andersson6-Sep-19 1:25 
GeneralRe: whoa, another reason to use keep-alive Pin
  Forogar  6-Sep-19 3:13
professional  Forogar  6-Sep-19 3:13 
GeneralRe: whoa, another reason to use keep-alive Pin
Jörgen Andersson6-Sep-19 3:19
protectorJörgen Andersson6-Sep-19 3:19 
GeneralRe: whoa, another reason to use keep-alive Pin
CodeWraith6-Sep-19 0:34
memberCodeWraith6-Sep-19 0:34 
GeneralRe: whoa, another reason to use keep-alive Pin
honey the codewitch6-Sep-19 0:36
memberhoney the codewitch6-Sep-19 0:36 
GeneralRe: whoa, another reason to use keep-alive Pin
CodeWraith6-Sep-19 1:56
memberCodeWraith6-Sep-19 1:56 
GeneralRe: whoa, another reason to use keep-alive Pin
honey the codewitch6-Sep-19 1:58
memberhoney the codewitch6-Sep-19 1:58 
Nothing I'm using is undocumented. Worst case, one day connections will no longer keep to the same thread.

In such a scenario that cache will still be used due to thread pooling, just maybe across connections, which is fine unless you're relying on that. Which is possible, but stupid to do and hard to do.

So anyway, as hacks go, this isn't really much of one. Edited (again) to add, this isn't even so much a hack as an observation about keep-alive.

It simply is faster when the connection uses the same thread. If it doesn't, you get a cache miss.

Here's the thing: I'm not using any undocumented API calls. I'm not using anything where the behavior *relies* on this thread sharing property of connections.

There's nothing to break except for breaking changes in .NET - at which point ALL of our .NET code is in trouble.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.

GeneralRe: whoa, another reason to use keep-alive Pin
CodeWraith6-Sep-19 2:13
memberCodeWraith6-Sep-19 2:13 
GeneralRe: whoa, another reason to use keep-alive Pin
honey the codewitch6-Sep-19 2:16
memberhoney the codewitch6-Sep-19 2:16 
GeneralRe: whoa, another reason to use keep-alive Pin
Chris Maunder6-Sep-19 3:47
adminChris Maunder6-Sep-19 3:47 
GeneralRe: whoa, another reason to use keep-alive Pin
honey the codewitch6-Sep-19 5:53
memberhoney the codewitch6-Sep-19 5:53 
RantWTH microsoft? why would you do this? Pin
honey the codewitch5-Sep-19 23:47
memberhoney the codewitch5-Sep-19 23:47 
GeneralRe: WTH microsoft? why would you do this? Pin
phil.o5-Sep-19 23:54
mvephil.o5-Sep-19 23:54 
GeneralRe: WTH microsoft? why would you do this? Pin
CodeWraith6-Sep-19 0:18
memberCodeWraith6-Sep-19 0:18 
GeneralRe: WTH microsoft? why would you do this? Pin
CodeWraith5-Sep-19 23:57
memberCodeWraith5-Sep-19 23:57 
GeneralRe: WTH microsoft? why would you do this? Pin
Jacquers6-Sep-19 1:08
memberJacquers6-Sep-19 1:08 
GeneralRe: WTH microsoft? why would you do this? Pin
honey the codewitch6-Sep-19 1:31
memberhoney the codewitch6-Sep-19 1:31 
GeneralRe: WTH microsoft? why would you do this? Pin
Richard Deeming6-Sep-19 2:04
mveRichard Deeming6-Sep-19 2:04 
GeneralRe: WTH microsoft? why would you do this? Pin
honey the codewitch6-Sep-19 2:06
memberhoney the codewitch6-Sep-19 2:06 
GeneralBonus CCC Pin
lw@zi 5-Sep-19 23:00
professional lw@zi 5-Sep-19 23:00 
GeneralRe: Bonus CCC Pin
Tim Deveaux6-Sep-19 15:24
memberTim Deveaux6-Sep-19 15:24 
GeneralRe: Bonus CCC Pin
lw@zi 8-Sep-19 21:41
professional lw@zi 8-Sep-19 21:41 
GeneralApplause where it is due Pin
Duncan Edwards Jones5-Sep-19 22:48
professionalDuncan Edwards Jones5-Sep-19 22:48 
GeneralRe: Applause where it is due Pin
honey the codewitch5-Sep-19 23:34
memberhoney the codewitch5-Sep-19 23:34 

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.