- Feature Articles
- CodeSOD
- Error'd
-
Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
using
awaitinstead of justTask.Runin the main function would make it run one task and then the other. the right way to do this in parallel is something likeTask.WaitAll(ProcessLogQueue(), ProcessFilesInFolder());Admin
except neither of those functions are async. they used Task.Run instead of just spawning actual threads
Admin
No. We try to load the file. (If we failed, we clearly didn't try and load, because we didn't load.)
Or "test" or "tEsT" (etc.) because it's a case insensitive comparison (the "true" at the end ends up in a parameter called "ignoreCase"(1)...). And it's not "appears in", but "is exactly" (subject to the vagaries of what "exactly" means for a case-insensitive comparison).
(1) See e.g. https://learn.microsoft.com/en-us/dotnet/api/system.string.compare?view=net-10.0#system-string-compare(system-string-system-string-system-boolean)
Admin
I wish all my customers were that smart.
Admin
I see that you & I have matching pet peeves.
Admin
Missed a perfect chance to annoy other pendants with slightly different pet peeves by saying "me and you"
Admin
I thought of that but couldn't bring myself to do it. James Dean, I am not.
Admin
Mixing traditional threading (Thread.Sleep) with parallel executions (Task) which enqueue via a safe execution and synchronization context into a thread pool is a super bad idea. Especially with stuff like Sleep or Abort you can literally can deadlock or block other tasks, so this code is pretty much a time bomb if it hasn't happened multiple times already.
Addendum 2026-01-26 09:01: Personally I don't understand what is so hard about this.
It's pretty easy, as long as you know the basics of what you are doing.
Admin
You can pass
Taskobjects to theWaitAll.Admin
I notice that the file handle is not kept open and that before every write there is a check for whether the file exists. My psychic WTF detector says that there is a separate process which moves the log file from "logFile" to "logFile_yesterday" every day at midnight. Succeeds almost always.
Admin
No because they append the date to the current log file.
Admin
Come on, I'm sure you could of.
Admin
The correct answer how to fix the logging is use Serilog.File BTW. There's so much wrong with how they approach logging, no point in reinventing the wheel. Fixing it would take weeks.
Admin
FULLZ UPDATED 2026 USA UK CANADA SSN NIN SIN INFO with ADDRESS DL Photos front & back with Selfie Passport Photos IT|SP|RUS|AUS|BR|FR amny Countries DL photos available
Children FUllz USA 2011-2023 Young & Old age FUllz 1930-2010 High CS Pros 700+ Comapny EIN Business Fullz LLC EIN Docs with DL Dead Fullz CC with CVV & Billin Address
NIN Fullz with Address NIN Fullz with address Sort Code & Account number NIN UK Fullz with DL UK DL photos front back with Selfie UK Passport Photos UK CC fullz
SIN Fullz with Address Canada DL Photos Front Back with Selfie CA Passpoprt Photos CA Email & Phone Number Active Leads Live CA Fullz
Germany|Spain|Australia Fullz with Address & DOB Email Leads (Forex, Crypto, Casino, Investors, CEO's, Crypto, Crypto Exchanges) Sweep Stakes Active Combos & B2B Leads
Tools & Tutorials available Carding Cash Out Scripting Spa--mming SMTP RDP C-panels Shells Web-Mailers SMS & Email Bulk Senders Look-Up Tutorials
Telegram@killhacks - @ leadsupplier What's App - (+1) 727..788..6129 TG Channel - t.me/leadsproviderworldwide Discord - @ leads.seller VK Messenger - @ leadsupplier Signal - @ killhacks.90 Zangi - 17-7369-4210 Email - exploit.tools4u at gmail dot com https://about.me/gilberthong
Many Other Stuff available in our shop Active & Live Fullz with guarantee Providing Replacements if anything found invalid Available 24/7
#fulz #leads #emailleads #sweepstakes #cryptoleads #casinoleads #ssnleads #dlphoto #usaleads #canadaleads #fullzusa #fullzuk #whatsapp #facebook #activeleads #ccshop #cvvdumps #usadocs #highcreditscorefullz #eincompanydocs #kycstuff #infokyc #validfullz #validvendor
Admin
It might be a short circuiting "and".
Admin
Task.Runreturns aTaskwhich can beawaited. It's inherentlyasyncif you want it to be.I agree with the initial suggestion; you can also add things like cancellation tokens to support halting long-running tasks. Also, for something like this, I would favor (and have favored) a
BlockingCollectionwhich will wait when empty until something lands, which is much better than doing your own waits.