Simplified example consumer.
diff --git a/example/example_consumer.go b/example/example_consumer.go
index dd09ea3..f4f64f9 100644
--- a/example/example_consumer.go
+++ b/example/example_consumer.go
@@ -9,10 +9,8 @@
const Mod = 1000000 * 10 // 1 million * N
-func consume(writerBarrier disruptor.Barrier, writerCursor, readerCursor *disruptor.Cursor) {
+func consume(reader *disruptor.Reader) {
// runtime.LockOSThread()
-
- reader := disruptor.NewReader(writerBarrier, writerCursor, readerCursor)
started := time.Now()
for {
diff --git a/example/main.go b/example/main.go
index 9a1cab9..ea8a72d 100644
--- a/example/main.go
+++ b/example/main.go
@@ -28,7 +28,8 @@
for i := 0; i < MaxConsumers; i++ {
readerCursor := disruptor.NewCursor()
readerCursors = append(readerCursors, readerCursor)
- go consume(writerBarrier, writerCursor, readerCursor)
+ reader := disruptor.NewReader(writerBarrier, writerCursor, readerCursor)
+ go consume(reader)
}
return readerCursors