jkorous marked 7 inline comments as done. jkorous added inline comments.
================ Comment at: xpc/test-client/ClangdXPCTestClient.cpp:51 + dlHandle, "clangd_xpc_get_bundle_identifier"); + xpc_connection_t conn = + xpc_connection_create(clangd_xpc_get_bundle_identifier(), NULL); ---------------- arphaman wrote: > jkorous wrote: > > arphaman wrote: > > > We should probably use the main queue here too to ensure that we don't > > > get bit by concurrent handler invocations. > > As far as I understand it this is taken care of by calling dispatch_main(). > > > > Per man dispatch_main: > > "MAIN QUEUE > > [...] > > Programs must call dispatch_main() at the end of main() in order to > > process blocks submitted to the main queue." > > > Not really. The documentation for the parameter states the following: > > The GCD queue to which the event handler block will be submitted. This > parameter may be NULL, in which case the connection's target queue will be > libdispatch's default target queue, defined as DISPATCH_TARGET_QUEUE_DEFAULT. > The target queue may be changed later with a call to > xpc_connection_set_target_queue(). > > So the handler blocks will be submitted to the concurrent queue > (DISPATCH_TARGET_QUEUE_DEFAULT) which means that they might end up running > concurrently. Sorry, my bad. https://reviews.llvm.org/D48562 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits