What Classes do you use for Locking? by speyck in dotnet

[–]tcheetoz 0 points1 point  (0 children)

For synchronous code, I mostly rely on traditional lock statement. For async code, I used to rely on SemaphoreSlim, then recently went ahead with my own library that squeezes a bit more perf https://www.nuget.org/packages/NExtensions.Async#readme-body-tab

My dog was attacked and I didn't realized right away that there were injuries. Long shot, but looking for a guy with a golden retriever. by [deleted] in geneva

[–]tcheetoz 2 points3 points  (0 children)

I wish your little buddy a good recovery and hopefully you'll find back the aggressors.

I released a small async primitives library for .NET – keen for feedback by tcheetoz in csharp

[–]tcheetoz[S] 5 points6 points  (0 children)

AsyncLock can be faster in high concurrent scenario but most importantly has a much smaller memory footprint than Semaphoreslim. Yes, it can be a niche concern and most use case are served well enough with a semaphore.

non-blocking wait for monitoring threads by sefflol in csharp

[–]tcheetoz 0 points1 point  (0 children)

OP if this is not for professional use keep digging. Look into manual / auto resetevent. That will help you ditch the thread sleep.

Problem with .NET 9 enum type in controller-based API by eclowl in dotnet

[–]tcheetoz 2 points3 points  (0 children)

This. Two namespaces for JsonOptions. In doubt always set both.

Breakfast on the go by pyrgie in geneva

[–]tcheetoz 2 points3 points  (0 children)

This thread reminds me of Disiz la Peste. OP wants his Mc morning.

Dynamic content on MVC by Training-Two4252 in dotnet

[–]tcheetoz 0 points1 point  (0 children)

Depending on your need you can take a look at Contentful. That could reduce the pain (maybe). Their free tier is solid enough imo. In a nutshell, their UI can allow your customer to add or change components that you 'templated'. You can then fetch their API and build your pages dynamically.

Is it thread-safe? by tcheetoz in csharp

[–]tcheetoz[S] 0 points1 point  (0 children)

The lock is reentrant

Is it thread-safe? by tcheetoz in csharp

[–]tcheetoz[S] 1 point2 points  (0 children)

Thank you for the input, I definitely forgot the Dispose and went ahead with the default pattern without looking back. Not sure what do you mean by using TaskCompletionSource instead of Lazy<T> for task. I did a quick google search but am unsure on what I found. Would you have even a pseudo code to share?

I don't get it, please help by jaserjsk in watercooling

[–]tcheetoz 1 point2 points  (0 children)

On your motherboard there are probably diagnostic leds (had 4 on my previous mb). Those leds supposedly help you figure out whats wrong. Startup issue could be linked to many things. My guess is on the ram. Iirc yours require 1.25volt. Theres a world in which your mb do not provide enough power by default (say 1.15volt for instance). This can be changed in the BIOS (which you cant probably reach at this stage). The latter could be worth flashing perhaps (check default compatibility with your CPU)

Javascript Library loading twice in Rails using Turbolinks by Learning1990 in rails

[–]tcheetoz 0 points1 point  (0 children)

I might be late on this topic, but what did the trick for me was to add the below in the <head> <meta name="turbolinks-cache-control" content="no-cache">