[PATCH] D90747: [clangd] Mark AsyncTaskRunner::runAsync as const

2020-11-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet abandoned this revision. kadircet added a comment. SG, gonna abandon this one and mark the threadpool as mutable in the ProjectAwareIndex instead. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90747/new/ https://reviews.llvm.org/D90747 _

[PATCH] D90747: [clangd] Mark AsyncTaskRunner::runAsync as const

2020-11-09 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. This isn't a hill I'm going to die on, it doesn't matter a great deal - so if this solves But I don't think this is an appropriate use of const - it changes the object in a significant way. "significant" is vague, but i think "wait()ing on a threadpool will now block

[PATCH] D90747: [clangd] Mark AsyncTaskRunner::runAsync as const

2020-11-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D90747#2379406 , @sammccall wrote: > AsyncTaskRunner is definitely threadsafe, but const doesn't exactly mean > threadsafe... Right, I was also trying to punt on the idea of "writes are synchronized" rather than promising th

[PATCH] D90747: [clangd] Mark AsyncTaskRunner::runAsync as const

2020-11-06 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. AsyncTaskRunner is definitely threadsafe, but const doesn't exactly mean threadsafe... This might be OK or maybe we should put `mutable` at the callsite - can you show the real example? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D90747: [clangd] Mark AsyncTaskRunner::runAsync as const

2020-11-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman. Herald added a project: clang. kadircet requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. RunAsync performs a write that's internally