|
I thought about wrapping a std::thread but chose not to for the reasons outlined here[^].
|
|
|
|
|
Sorry, I missed that.
In that case, it would be simple enough to wrap pthread in a little class of your own. I wouldn't bother with an external library personally, especially if you don't trust it anymore. I do in fact do this myself (because my code also dates back to pre-C 11 days) and it was very little work.
Paul Sanders.
Not that the story need be long, but it will take a long while to make it short - Henry David Thoreau
Some of my best work is in the undo buffer.
|
|
|
|
|
Wrapping pthread is indeed what I did when porting to Linux. It's wrapped by this[^], for which the Linux target is here[^]. And that, in turn, is wrapped by a much more comprehensive Thread [^] class.
|
|
|
|
|
Nice wrapper.
I re-read your original post, and I now understand what your problem was / is - that pthread_t s get re-used more quickly than you would like. Kinda dangerous to assume that they won't be...
Paul Sanders.
Not that the story need be long, but it will take a long while to make it short - Henry David Thoreau
Some of my best work is in the undo buffer.
|
|
|
|
|
|
My approach to gambling is pretty simple: look at the cars.
What car does the average casino owner / lottery CEO / bookmaker drive? What did that probably cost? Call it "x"
What car does the average punter drive? What did that cost? Call that "y".
Invariably, x > y (and normally x >>>>> y) - so the punter is funding the owner / CEO / bookie and is almost certain to lose ...
I'm just not a gambler - I last played a fruit machine back in the early eighties, when I won a £50 jackpot which paid off my whole overdraft! I realized that statistically I'd never do that again, so putting money in them was pointless.* #
* I spent it all on beer instead.
"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!
|
|
|
|
|
Yup. Back in the day, I worked many conventions in (among other places) Vegas. Mostly in the big hotels, MGM etc. Great place for food and entertainment as long as you stay out of the casino. Always did. Great idea to check out the lifestyle of the owners.
If you can't contain your urge to gamble, go to the old section of town where you can learn with nickles and dimes. Well you could some 20 years ago.
>64
Some days the dragon wins. Suck it up.
|
|
|
|
|
It doesn't really matter whether you gamble with small or large amounts. The key rule is never gamble what you cannot afford to lose. Oh, and never, ever, chase your losses.
|
|
|
|
|
Exactly the same goes with investments in the bourse / stock market
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Well it is just a form of betting.
|
|
|
|
|
True...
and sometimes is even worse than gambling.
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
If there's no fundamental reason for a stock getting cheaper, like bad news or being overvalued, adding to a position can make sense. It's on sale! How long it will take to recover is the question. Maybe someone had to sell and it will come back quickly. Maybe the sector lost some of its appeal and it will take longer. Or maybe there's bad news that you don't know about yet.
|
|
|
|
|
Greg Utas wrote: Maybe the sector lost some of its appeal and it will take longer. Or maybe there's bad news that you don't know about yet.
I assume the name "JDS Uniphase" rings some bells to you
Mircea
|
|
|
|
|
JDSU did ring a bell. I was also at Nortel for over 20 years.
|
|
|
|
|
|
When I was in the Navy, I saw sailors lose a whole month's wages on the turn of one card.
That's where I learned gambling was a fool's game. I have never gambled, since.
Money is too hard to come by, to throw it away like that.
ed
|
|
|
|
|
I may have to use two ESP32S3 MCUs to drive my Prang MIDI box. They're only a $1.80 a piece at Mouser, but it seems wasteful still, because that means there is hardware for two bluetooth radios, and a whole bunch of extra RAM and CPU I don't need. Mostly just so I can put a second USB port on the thing. I guess it's a good thing it doesn't need to run on batteries, but I still wonder if the load will be too much for USB power. I'm researching other options but anything I do will be kind of a hack, and a waste.
But that's how IoT is. You get an MCU with a bunch of I/O you'll probably not use all of for any single project. The things are cheap and relatively low power, but it still bothers me using a whole extra MCU to drive a second USB port.
To err is human. Fortune favors the monsters.
|
|
|
|
|
Completely offtopic:
How is that DAS KEYBOARD going? Are you happy with it?
|
|
|
|
|
I appreciate it every time I sit down at my desk. It doesn't look brand new anymore, mostly because I'm filthy, but it works like new, and all the key caps are unworn.
To err is human. Fortune favors the monsters.
|
|
|
|
|
Given you are in the US you can get nice PBT keycaps for your keyboard... in my case (Spanish language + ISO layout) that would be almost an impossible mission...
Which switches did you got in your keyboard?
Thinking on getting a mechanical keyboard for myself and was wondering if you were enjoying yours for typing/programming.
|
|
|
|
|
The Das 5qs does not use cherry switches. It uses a somewhat proprietary omicron switch. The reason it's "somewhat proprietary" is Das' has a novel RGB lighting scheme where the light runs through the middle of the switch, through (i think) like a fiber optic tube to each key.
It's the only thing I'm not 100% pleased with. Other than that the keyboard is perfect, and honestly, these switches are perfect for me anyway.
To err is human. Fortune favors the monsters.
|
|
|
|
|
Nice!
Thanks for sharing
|
|
|
|
|
honey the codewitch wrote: a whole bunch of extra RAM and CPU I don't need That's it. We've had enough of your heretical notions, witch.
Software Zen: delete this;
|
|
|
|
|
Glad to see your post. It reaffirms my decision to only work with business applications
|
|
|
|
|
I mean, when it comes down to it, nothing wastes hardware like business apps. Throw .NET at something and it costs 30% of your CPU bandwidth compared to C++
Then you have endless frameworks where maintainability and compliance are more important than performance.
Add to that the notion that hardware is cheaper than software.
IoT waste has nothing on bizdev.
To err is human. Fortune favors the monsters.
|
|
|
|