{"action":"created","issue":{"url":"https://api.github.com/repos/square/sqlbrite/issues/110","repository_url":"https://api.github.com/repos/square/sqlbrite","labels_url":"https://api.github.com/repos/square/sqlbrite/issues/110/labels{/name}","comments_url":"https://api.github.com/repos/square/sqlbrite/issues/110/comments","events_url":"https://api.github.com/repos/square/sqlbrite/issues/110/events","html_url":"https://github.com/square/sqlbrite/issues/110","id":155448049,"number":110,"title":"WAL mode","user":{"login":"mblcdr","id":3671190,"avatar_url":"https://avatars.githubusercontent.com/u/3671190?v=3","gravatar_id":"","url":"https://api.github.com/users/mblcdr","html_url":"https://github.com/mblcdr","followers_url":"https://api.github.com/users/mblcdr/followers","following_url":"https://api.github.com/users/mblcdr/following{/other_user}","gists_url":"https://api.github.com/users/mblcdr/gists{/gist_id}","starred_url":"https://api.github.com/users/mblcdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mblcdr/subscriptions","organizations_url":"https://api.github.com/users/mblcdr/orgs","repos_url":"https://api.github.com/users/mblcdr/repos","events_url":"https://api.github.com/users/mblcdr/events{/privacy}","received_events_url":"https://api.github.com/users/mblcdr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-05-18T08:50:42Z","updated_at":"2016-07-07T14:08:20Z","closed_at":null,"body":"I see that sqlbrite opens transaction using ```beginTransactionWithListener()``` which as you may know starts the transaction in EXCLUSIVE mode.\r\nI was wondering why you don't use ```beginTransactionWithListenerNonExclusive()``` which makes it possible for read operations to be performed concurrently alongside a write."},"comment":{"url":"https://api.github.com/repos/square/sqlbrite/issues/comments/231088331","html_url":"https://github.com/square/sqlbrite/issues/110#issuecomment-231088331","issue_url":"https://api.github.com/repos/square/sqlbrite/issues/110","id":231088331,"user":{"login":"JakeWharton","id":66577,"avatar_url":"https://avatars.githubusercontent.com/u/66577?v=3","gravatar_id":"","url":"https://api.github.com/users/JakeWharton","html_url":"https://github.com/JakeWharton","followers_url":"https://api.github.com/users/JakeWharton/followers","following_url":"https://api.github.com/users/JakeWharton/following{/other_user}","gists_url":"https://api.github.com/users/JakeWharton/gists{/gist_id}","starred_url":"https://api.github.com/users/JakeWharton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JakeWharton/subscriptions","organizations_url":"https://api.github.com/users/JakeWharton/orgs","repos_url":"https://api.github.com/users/JakeWharton/repos","events_url":"https://api.github.com/users/JakeWharton/events{/privacy}","received_events_url":"https://api.github.com/users/JakeWharton/received_events","type":"User","site_admin":false},"created_at":"2016-07-07T14:08:20Z","updated_at":"2016-07-07T14:08:20Z","body":"Yeah if we used that the naming difference between that and `SQLiteDatabase` concerns me a bit. That and the fact that it's not really clear what \"Immediate\" means in this context.\r\n\r\nAs to a test, it would be something like this:\r\n```java\r\nfinal BriteDatabase db = //...\r\n\r\nfinal CountDownLatch transactionStarted = new CountDownLatch(1);\r\nfinal CountDownLatch transactionProceed = new CountDownLatch(1);\r\nfinal CountDownLatch transactionCompleted = new CountDownLatch(1);\r\n\r\nnew Thread() {\r\n  @Override public void run() {\r\n    Transaction transaction = db.newNonExclusiveTransaction();\r\n    transactionStarted.countDown();\r\n    transactionProceed.await(10, SECONDS);\r\n    transaction.markSuccessful();\r\n    transaction.close();\r\n    transactionCompleted.countDown();\r\n  }\r\n}.start();\r\n\r\nassertTrue(transactionStarted.await(10, SECONDS));\r\n\r\n// Copy an assertion here from another test that executes a simple query...\r\n\r\ntransactionProceed.countDown();\r\nassertTrue(transactionCompleted.await(10, SECONDS));\r\n```"}}
{"actor":{"display_login":"JakeWharton"}}