I'm prototyping a server with Swift 4.2 and Vapor 3.2.2 on ubuntu 16.04.. I have a dependency in C that I'm invoking and the dependency is trying to run code on the main thread.
I'm successfully running warmup and test code in a test program and in my Vapor server's configure hook – both running on the main thread. In my request/response loop though, the dependency stalls when running the same code path with the same input, apparently because the main thread is blocked. Based on this issue:
I understood that the main thread wasn't blocked anymore. Separately I'm wondering if there's a straightforward way to configure the number of threads available to the dispatch queues.
I'm hoping the community will have some advice for me, and I'm happy to provide more details if that's helpful (I can't talk about what the specific dependency is, but I can provide redacted output and thread states for example).
Thanks a ton!