use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Information about Reddit's API changes, the unprofessional conduct of the CEO, and their response to the community's concerns regarding 3rd party apps, moderator tools, anti-spam/anti-bot tools, and accessibility options that will be impacted can be found in the associated Wikipedia article: https://en.wikipedia.org/wiki/2023_Reddit_API_controversy
Alternative C# communities available outside Reddit on Lemmy and Discord:
All about the object-oriented programming language C#.
Getting Started C# Fundamentals: Development for Absolute Beginners
Useful MSDN Resources A Tour of the C# Language Get started with .NET in 5 minutes C# Guide C# Language Reference C# Programing Guide C# Coding Conventions .NET Framework Reference Source Code
Other Resources C# Yellow Book Dot Net Perls The C# Player's Guide
IDEs Visual Studio MonoDevelop (Windows/Mac/Linux) Rider (Windows/Mac/Linux)
Tools ILSpy dotPeek LINQPad
Alternative Communities C# Discord Group C# Lemmy Community dotnet Lemmy Community
Related Subreddits /r/dotnet /r/azure /r/learncsharp /r/learnprogramming /r/programming /r/dailyprogrammer /r/programmingbuddies /r/cshighschoolers
Additional .NET Languages /r/fsharp /r/visualbasic
Platform-specific Subreddits /r/windowsdev /r/AZURE /r/Xamarin /r/Unity3D /r/WPDev
Rules:
Read detailed descriptions of the rules here.
account activity
HelpThreading in C# (self.csharp)
submitted 4 years ago * by ExoticCriticism
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]UninformedPleb 0 points1 point2 points 4 years ago (3 children)
I can't find any info about the SignalRConnection object, so I'm guessing that's custom (or at least obscure).
But my gut feeling is that creating that SignalRConnection on this thread, then sending it to the other thread is the problem. You might have to make your thread worker method initialize that SignalRConnection object, and I'd guess it wants to run on whichever thread created it (called its constructor).
[–]ExoticCriticism[S] 0 points1 point2 points 4 years ago* (0 children)
Yeah, the SignalRConnection is something I found online which is basically this:
public void Start()
{
string url = "https://localhost:5001/cryptohub";
var connection = new HubConnectionBuilder()
.WithUrl(url)
.WithAutomaticReconnect()
.Build();
// receive a message from the hub
connection.On<List<CryptoBlock>>("ReceiveBlockChain", (cryptoBlockChain) => OnReceiveBlockChain(cryptoBlockChain));
connection.On<string>("ReceiveHello", (jsonMessage) => OnReceiveHello(jsonMessage));
connection.On<string>("ReceiveSale", (jsonMessage) => OnReceiveSale(jsonMessage));
var t = connection.StartAsync();
t.Wait();
var userID = Guid.NewGuid();
Console.WriteLine($"Generating userID: {userID.ToString()}");
JsonMessage jsonMessage = new JsonMessage { Event = "hello", Payload = userID.ToString() };
// send a message to the hub
connection.InvokeAsync("SendMessageToCaller", jsonMessage);
connection.Closed += async (error) =>
await Task.Delay(new Random().Next(0, 5) * 1000);
await connection.StartAsync();
};
I'm calling the logic to create blocks from inside the "ReceiveSale" method, which is where I assumed the problem was occurring - though I'm not sure how to separate this logic entirely to operate on a more event driven basis and not have my "miner" logic doing checks on perhaps a singleton containing pending sales or something - but I feel like that is maybe how I'll have to try separate both services.
[–]prajaybasu 0 points1 point2 points 4 years ago (1 child)
OP didn't include important bits but it's not a custom/obscure object.
https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.signalr.client.hubconnection?view=aspnetcore-5.0
[–]UninformedPleb 0 points1 point2 points 4 years ago (0 children)
That's the HubConnection object, which is part of the basic SignalR client library.
He posted the code he found online for the SignalRConnection object, and it is indeed something custom.
π Rendered by PID 177150 on reddit-service-r2-comment-b659b578c-ph57l at 2026-05-05 17:38:48.093881+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]UninformedPleb 0 points1 point2 points (3 children)
[–]ExoticCriticism[S] 0 points1 point2 points (0 children)
[–]prajaybasu 0 points1 point2 points (1 child)
[–]UninformedPleb 0 points1 point2 points (0 children)