jonathan-beard / fifo

simple lock free ringbuffer
Apache License 2.0
12 stars 3 forks source link

errors in Example code? #2

Open tnovotny opened 6 years ago

tnovotny commented 6 years ago

In the Example

  1. it looks like func_b should be doing a pop and not push.
  2. there is a race condition on term. That's UB, so it should probably be something like an atomic<bool>.
jonathan-beard commented 6 years ago

Thanks! I'll take a look this weekend.