{"action":"created","issue":{"url":"https://api.github.com/repos/real-logic/Agrona/issues/48","labels_url":"https://api.github.com/repos/real-logic/Agrona/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/real-logic/Agrona/issues/48/comments","events_url":"https://api.github.com/repos/real-logic/Agrona/issues/48/events","html_url":"https://github.com/real-logic/Agrona/issues/48","id":121353583,"number":48,"title":"ManyToManyConcurrentArrayQueue with capacity = 1","user":{"login":"metanet","id":999867,"avatar_url":"https://avatars.githubusercontent.com/u/999867?v=3","gravatar_id":"","url":"https://api.github.com/users/metanet","html_url":"https://github.com/metanet","followers_url":"https://api.github.com/users/metanet/followers","following_url":"https://api.github.com/users/metanet/following{/other_user}","gists_url":"https://api.github.com/users/metanet/gists{/gist_id}","starred_url":"https://api.github.com/users/metanet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metanet/subscriptions","organizations_url":"https://api.github.com/users/metanet/orgs","repos_url":"https://api.github.com/users/metanet/repos","events_url":"https://api.github.com/users/metanet/events{/privacy}","received_events_url":"https://api.github.com/users/metanet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-09T22:18:22Z","updated_at":"2015-12-09T22:41:33Z","closed_at":null,"body":"Hi,\r\n\r\nI was playing with ManyToManyConcurrentArrayQueue and got confused about behaviour of the queue when I set its capacity to 1. \r\n\r\nMy agrona version is 0.4.8 and here is my test:\r\n\r\n```\r\nimport org.junit.Test;\r\n\r\nimport static org.junit.Assert.assertFalse;\r\nimport uk.co.real_logic.agrona.concurrent.ManyToManyConcurrentArrayQueue;\r\n\r\npublic class ManyToManyTest\r\n{\r\n\r\n    private ManyToManyConcurrentArrayQueue<Integer> queue = new ManyToManyConcurrentArrayQueue<>( 1 );\r\n\r\n    @Test\r\n    public void shouldNotOfferSecondInteger() {\r\n        queue.offer( 1 );\r\n        assertFalse(queue.offer( 2 ));\r\n    }\r\n\r\n}\r\n```\r\n\r\n``queue.offer(2)`` overwrites the first element and returns ``true``. Is ManyToMany queue with capacity=1 not supported (I check the source but couldn't see anything related to it) or am I missing something?\r\n\r\nThanks in advance\r\n"},"comment":{"url":"https://api.github.com/repos/real-logic/Agrona/issues/comments/163424339","html_url":"https://github.com/real-logic/Agrona/issues/48#issuecomment-163424339","issue_url":"https://api.github.com/repos/real-logic/Agrona/issues/48","id":163424339,"user":{"login":"metanet","id":999867,"avatar_url":"https://avatars.githubusercontent.com/u/999867?v=3","gravatar_id":"","url":"https://api.github.com/users/metanet","html_url":"https://github.com/metanet","followers_url":"https://api.github.com/users/metanet/followers","following_url":"https://api.github.com/users/metanet/following{/other_user}","gists_url":"https://api.github.com/users/metanet/gists{/gist_id}","starred_url":"https://api.github.com/users/metanet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metanet/subscriptions","organizations_url":"https://api.github.com/users/metanet/orgs","repos_url":"https://api.github.com/users/metanet/repos","events_url":"https://api.github.com/users/metanet/events{/privacy}","received_events_url":"https://api.github.com/users/metanet/received_events","type":"User","site_admin":false},"created_at":"2015-12-09T22:41:33Z","updated_at":"2015-12-09T22:41:33Z","body":"yeah, that was my guess.\r\n\r\nthanks a lot for the clarification"}}