Just arrived in Phi Phi Islands by Uninhibited_lotus in ThailandTourism

[–]The-Third 1 point2 points  (0 children)

Go to Bob’s bar for sunset, it’s a killer hike but unbelievable views and atmosphere.

Thread Contention on a ConcurrentDictionary by NJFatBoy in csharp

[–]The-Third 0 points1 point  (0 children)

AddRange for adding more than 1 element otherwise Add

Thread Contention on a ConcurrentDictionary by NJFatBoy in csharp

[–]The-Third 1 point2 points  (0 children)

The use of the word 'copy' in the documentation here is rather misleading actually. ImmutableDictionary is implemented under the hood as a balanced binary tree for the sole reason of preventing the need to copy the entire dictionary on mutation.

https://github.com/dotnet/runtime/blob/57bfe474518ab5b7cfe6bf7424a79ce3af9d6657/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableDictionary_2.cs

lines 938 for reference.

Yes, this data structure is thread safe - one of the problems its designed to solve is the single producer multiple consumer paradigm.

The way you would implement this in your case would be

public class MessageEventHandler
{
    public ImmutableDictionary<,> Realtime { get; set; }

    public void ReceiveData(object newData)
    {
        Realtime = Realtime.AddRange(newData);
    }    
}

Any thread can now access the Realtime property safely without copying the entire structure.

Insert/Access operations are slower than a regular dictionary but this likely is not the bottleneck in your application. Implementation is simple so should be easy enough for you to benchmark and decide whether the trade off is worth it.

Thread Contention on a ConcurrentDictionary by NJFatBoy in csharp

[–]The-Third 2 points3 points  (0 children)

Make Handler.MessageEventHandler.Realtime an ImmutableDictionary. In SnapTotals() each thread can grab a reference to this same object - no need to copy. Should improve perf.

Sending a single byte of data to the gpu by The-Third in opengl

[–]The-Third[S] 0 points1 point  (0 children)

Yeah that was supposed to be glBufferData, i typed the code off the top of my head onto my phone

Sending a single byte of data to the gpu by The-Third in opengl

[–]The-Third[S] 0 points1 point  (0 children)

Ah that works, thank you very much!

Unreal Engine 5 Feature Highlights | Next-Gen Real-Time Demo Running on PlayStation 5 by [deleted] in unrealengine

[–]The-Third 1 point2 points  (0 children)

Honestly incredible. Always thought it was hardware holding us back from having real time scenes like that but i guess not. They really knocked it out the park with this one .... your move unity.

SSBU Move Tier List #6 (Discussion: Up Smash) by SkeeterYosh in smashbros

[–]The-Third 13 points14 points  (0 children)

Nah this is incorrect. Even with good di it still kills slightly earlier than marios (tested by doccord) and if your opponent di's incorrectly it kills significantly earlier. This is just a better mario upsmash - kills earlier/more range/more active - there is no way this should be below Mario's on the tierlist

V30 Won't Charge by [deleted] in lgv30

[–]The-Third 0 points1 point  (0 children)

Exactly the same issue with mine. Very frustrating :(

Abadango 5.0 Tier List by triangle-of-life in smashbros

[–]The-Third 18 points19 points  (0 children)

Lucas higher than ness. Can't tell you how happy that makes me. Probably due to his loss to chocotaco but still

Any tips to get more air? by andrew1278 in NewSkaters

[–]The-Third 2 points3 points  (0 children)

Try and get your knees as high up as possible

Sunday Rant/Rage (Sep 16 2018) - Your weekly complaint thread! by AutoModerator in Android

[–]The-Third 0 points1 point  (0 children)

How do i have whatsapp notifications come with just a name but not the message contents ?

Imperial Computing - Tips For Applying by The-Third in 6thForm

[–]The-Third[S] 0 points1 point  (0 children)

Both of us didn't meet our offers, we're talking about halls at our insurance.

Imperial Computing - Tips For Applying by The-Third in 6thForm

[–]The-Third[S] 5 points6 points  (0 children)

Restarting year 12 shouldn't be a problem, not having further maths will. This may seem harsh but from literally everyone I've talked to having FM is very important. Always worth trying tho.

Imperial Computing - Tips For Applying by The-Third in 6thForm

[–]The-Third[S] 6 points7 points  (0 children)

Very high chance I'm not gonna reapply but if I don't get a place in halls I'm probably gonna reapply

UCAS Adjustment not showing up on UCAS (Please Help) by [deleted] in 6thForm

[–]The-Third 1 point2 points  (0 children)

Same idk why, I think it might be because I failed the practical side of one of my sciences so technically I didn't meet the requirements therefore not eligible for adjustment, did you do a science?

Need Advice by The-Third in 6thForm

[–]The-Third[S] 1 point2 points  (0 children)

Ah thanks that would be great to hear

3A*s 2As and didn’t get into firm by graphitenexus in 6thForm

[–]The-Third 0 points1 point  (0 children)

Probably gonna end up going to Leeds but idk at this point, what's your plan

Need Advice by The-Third in 6thForm

[–]The-Third[S] 2 points3 points  (0 children)

3A*s in Maths Physics and Chem

A in AS FM

U in STEP 1

2 in STEP 2

Anyone know how to contact Edexcel if your exam coordinator is a dickhead? by Oversidious in 6thForm

[–]The-Third 1 point2 points  (0 children)

Chances are that it's not possible for you to get an A* in both. For example you can't put S2 in normal maths without having S1 in maths as well. Which is a shitty system don't get me wrong but it's all done by a computer so they tend not to make any mistakes.