allow specifying work/async queues via configuration #881
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
I need to run idb in a node native addon thus there is nothing to drive the main queue which is used under the hood. This PR seems to allow me to boot a device and receive the callbacks by providing custom async/work queues via
FBSimulatorControlConfiguration. I tried to make this an opt in behaviour - the new properties are defaultniland have a designated initializer and internally the work/async queues use the old values if these configuration values are not specified.Test Plan
Testing is something i wanted some feedback on. So obviously:
dispatch_get_main_queue()which would then need to be adjusted - as in the tests should then use a given queue (most likely each test should be run with main and with a custom queue?), provide it to the frameworks via the configuration and expect everything to work. Is that the route that should be taken here?