Post
by Flake » Wed Dec 09, 2015 4:18 am
Okay so I just moved from my current system of "Thread Safe" lists to ConcurrentQueue, which appears to be working well.
I never used ConcurrentQueue for two reasons: 1) didn't really know about it. 2) It for some reason was new and scary to me.
Concurrent queue works like so: You Enqueue and object to the queue, adding it to the end.
And you can TryDequeue to pop an item off the front of the list. The idea is that multiple threads can add to the queue and multiple threads can remove from the queue. The downside is that there is no accessable list available but considering I am just popping packets in an out of the queue and not concerned with the contents so much this shouldn't cause me any issues.
The up side: ConcurrentQueue is FAST, very fast. And it's clean, not much chance for any bugs either. I gave it a test on my PC and it appears to be working okay.
Last edited by
Flake on Wed Dec 09, 2015 6:07 am, edited 1 time in total.
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!