16,051 reputation
23063
bio website
location
age
visits member for 4 years
seen 12 mins ago

1d
comment Understanding multi-threadiing PHP (pthreads)
Multi-threading, should you decide to delve into it, is a massive can-o-worms causing hard to track down bugs throughout an application. Those who do delve into it are never the same again. T(h)read carefully.
2d
comment Effect of not calling pthread_attr_destroy - pthread
Q: "What happens if you don't clean up what you create?" A:"A resource leak."
May
21
comment Blocking function call with asynchronous content
is this in one process (service is a library and application has multiple threads that call into it)?
May
21
comment Blocking function call with asynchronous content
Many people will suggest to not do sync over async.
May
20
comment return a object without returning the reference
@ThomasOwens That grammar structure tends to happen when I change my mind mid answer, I clarified it some.
May
20
comment return a object without returning the reference
@John then you need the read-only view method in the second part of my answer. That view will have no setters.
May
19
comment getting square root(without using Math.sqrt function) using iteration loop or recursion
what did you try?
May
12
comment Testing binary stream
You can use BytesIO to provide the mocked stream (or implement your own)
Apr
28
comment Translation algorithm - combinations to indices
Technically there still is in my answer as it assumes that the order of the cards matter, if you remove that then you have a lot less options for the subsequent cards but the algorithm is more complicated.
Apr
28
comment Translation algorithm - combinations to indices
@Neil and then you don't have to adjust the individual cards either.
Apr
20
comment Why does an interface extend an interface instead of implementing it?
Because an interface couldn't implement anything before default methods where a thing.
Apr
20
comment Why was the AT&T assembly syntax designed this way?
it's possible but in ye olde days of RAM counted in kilo bytes and clock speeds not that much more simplifying the parser trumps simplifying it for the user.
Apr
20
comment Why was the AT&T assembly syntax designed this way?
Also sigils greatly reduce parsing complexity because the first character tells exactly what the word is and can be fed into a switch.
Apr
17
comment Difference between Throttling and Rate limiting in API Management
@Dunk still fits; the cap is enforced serverside and the throttle is set client side (usually after hitting the rate limit or throughput limit).
Apr
17
comment Verifying absence of an event in multithreaded unit test
or mock the executor that runs the task and ensure the task completes? You did use DI for that, didn't you?
Apr
17
comment How to mark next version in the source code?
@Borek hat it should be is opinion based. Though including a way to easily identify which commit/branch it was built from is preferable.
Apr
16
comment Difference between Throttling and Rate limiting in API Management
Rate limiting is on the receiving end to force the sender to throttle.
Apr
14
comment How does a program talk to a graphics card?
other related: stackoverflow.com/questions/6399676/…
Apr
9
comment is there a cleaner / simpler way to code this?
I'm voting to close this question as off-topic because it is a code review question.
Apr
9
comment is there a cleaner / simpler way to code this?
If it works as intended then ask on codeReview.SE (it has to work they are very strict about that), if it doesn't then go to SO.