Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming.threads > #578 > unrolled thread

usage of vyukov's mpsc queue

Started byEphi Sinowitz <esinowitz.public@gmail.com>
First post2011-09-20 06:55 -0700
Last post2011-09-24 22:44 -0700
Articles 2 on this page of 22 — 8 participants

Back to article view | Back to comp.programming.threads


Contents

  usage of vyukov's mpsc queue Ephi Sinowitz <esinowitz.public@gmail.com> - 2011-09-20 06:55 -0700
    Re: usage of vyukov's mpsc queue Joshua Maurice <joshuamaurice@gmail.com> - 2011-09-20 17:19 -0700
      Re: usage of vyukov's mpsc queue Ephi Sinowitz <esinowitz.public@gmail.com> - 2011-09-20 18:35 -0700
        Re: usage of vyukov's mpsc queue Ephraim Sinowitz <ephisinowitz@yahoo.com> - 2011-09-21 06:42 -0400
    Re: usage of vyukov's mpsc queue Joshua Maurice <joshuamaurice@gmail.com> - 2011-09-21 00:26 -0700
    Re: usage of vyukov's mpsc queue Alexander Terekhov <terekhov@web.de> - 2011-09-21 12:19 +0200
      Re: usage of vyukov's mpsc queue Alexander Terekhov <terekhov@web.de> - 2011-09-21 12:34 +0200
      Re: usage of vyukov's mpsc queue Ephi Sinowitz <ephisinowitz@yahoo.com> - 2011-09-21 06:58 -0400
        Re: usage of vyukov's mpsc queue Alexander Terekhov <terekhov@web.de> - 2011-09-21 14:02 +0200
          Re: usage of vyukov's mpsc queue Ephi Sinowitz <esinowitz.public@gmail.com> - 2011-09-21 06:08 -0700
            Re: usage of vyukov's mpsc queue Alexander Terekhov <terekhov@web.de> - 2011-09-21 15:18 +0200
              Re: usage of vyukov's mpsc queue Ephi Sinowitz <esinowitz.public@gmail.com> - 2011-09-21 06:56 -0700
                Re: usage of vyukov's mpsc queue Alexander Terekhov <terekhov@web.de> - 2011-09-21 17:06 +0200
                  Re: usage of vyukov's mpsc queue Ephi Sinowitz <esinowitz.public@gmail.com> - 2011-09-21 09:16 -0700
                    Re: usage of vyukov's mpsc queue Alexander Terekhov <terekhov@web.de> - 2011-09-21 18:20 +0200
    Re: usage of vyukov's mpsc queue Dmitriy Vyukov <dvyukov@gmail.com> - 2011-09-21 09:58 -0700
      Re: usage of vyukov's mpsc queue Alexander Terekhov <terekhov@web.de> - 2011-09-21 19:33 +0200
        Re: usage of vyukov's mpsc queue dvyukov@google.com - 2011-10-02 04:13 -0700
          Re: usage of vyukov's mpsc queue Alexander Terekhov <terekhov@web.de> - 2011-10-04 12:15 +0200
      Re: usage of vyukov's mpsc queue Ephi Sinowitz <esinowitz.public@gmail.com> - 2011-09-21 11:04 -0700
        Re: usage of vyukov's mpsc queue Ephi Sinowitz <esinowitz.public@gmail.com> - 2011-09-21 11:17 -0700
        Re: usage of vyukov's mpsc queue "Chris M. Thomasson" <cristom@charter.net> - 2011-09-24 22:44 -0700

Page 2 of 2 — ← Prev page 1 [2]


#596

FromEphi Sinowitz <esinowitz.public@gmail.com>
Date2011-09-21 11:17 -0700
Message-ID<03fcf14e-dd2a-4bea-a1bc-f856d656454d@t3g2000vbe.googlegroups.com>
In reply to#595
> But I am on x64. Shouldn't the STORE-RELEASE /LOAD-ACQUIRE come
> automatically.http://www.justsoftwaresolutions.co.uk/threading/intel-memory-orderin...

Ok I see where I'm wrong here. x86 just ensures read ordering against
other reads and stores against other stores.
Bear with me here I'm just learning :)

[toc] | [prev] | [next] | [standalone]


#604

From"Chris M. Thomasson" <cristom@charter.net>
Date2011-09-24 22:44 -0700
Message-ID<pczfq.27703$CY4.18368@newsfe04.iad>
In reply to#595
"Ephi Sinowitz" <esinowitz.public@gmail.com> wrote in message 
news:9b9a1b82-1943-4a90-853b-0da97d3c4c65@17g2000yqv.googlegroups.com...
On Sep 21, 12:58 pm, Dmitriy Vyukov <dvyu...@gmail.com> wrote:
[...]

> OK. So like this?
> Producers
> ---------------
> push()
> if (TryEnterCriticalSection(&cs)) WakeConditionVariable(&cond);
>
> Consumer
> ---------------
> EnterCriticalSection(&cs);
> for (;;)
>    SleepConditionVariableCS (&cond, &cs, INFINITE);
>     while (void* item = vyukov_queue.pop())
>     {
>           // do work
>      }
> }

Try something like this:

http://software.intel.com/en-us/forums/showthread.php?t=62364
(nice!)


or perhaps:

http://groups.google.com/group/comp.programming.threads/browse_frm/thread/6cf4655c4e0b7c95

http://groups.google.com/group/comp.programming.threads/msg/50ced5527a964ca4

;^) 

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.programming.threads


csiph-web