Re: C# Deque found on the web--thanks to The Game Programming Wiki



Jon Skeet [C# MVP] wrote:
[...]
I *could* have used LinkedList for this (except that I originally wrote it before 2.0, of course) but it feels more like a "queue with occasional random access" than a normal linked list. (Finding the right point to insert a new item is also quicker this way than with a linked list.)

Well, you are free to call it a queue, of course. But it's not really a queue, at least not a pure one. :)

I'm curious what it is about your implementation that makes insertion of new items faster than if using a linked list?

Pete
.



Relevant Pages

  • Re: Multithreading in .NET CF
    ... Alex Yakhnin, .NET CF MVP ... BackgroundWorker class for the .NET CF that works with an input queue. ... It's because I'm doing a custom control that loads images in background when a path is specified. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Multithreading in .NET CF
    ... Alex Yakhnin, .NET CF MVP ... BackgroundWorker class for the .NET CF that works with an input queue. ... It's because I'm doing a custom control that loads images in background ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: exit() equivalent in MFC
    ... It is placed in the queue, and at some future point is handled. ... >> generated during the shutdown. ... there is no way the posted quit message ... MVP Tips: http://www.flounder.com/mvp_tips.htm ...
    (microsoft.public.vc.mfc)
  • Re: developing network simulation.
    ... If you use the semaphore approach, each thread would wait on the queue semaphore. ... and there's an article on how to do it on my MVP Tips site. ... >impossible to achieve this based on this design. ...
    (microsoft.public.vc.mfc)
  • Re: developing network simulation.
    ... >> Use a semaphore to determine whether the thread is paused. ... queue the event and then check if the thread is paused. ... >> Queues using push(). ... MVP Tips: http://www.flounder.com/mvp_tips.htm ...
    (microsoft.public.vc.mfc)