|
38 | 38 |
|
39 | 39 | int main(int argc, const char * argv[])
|
40 | 40 | {
|
41 |
| - int exitCode = EXIT_SUCCESS; |
42 |
| - @autoreleasepool { |
43 |
| - dft::logging::Setup(); |
| 41 | + __auto_type * runQueue = dispatch_queue_create("com.chip.main.dft", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); |
| 42 | + dispatch_async(runQueue, ^{ |
| 43 | + int exitCode = EXIT_SUCCESS; |
44 | 44 |
|
45 |
| - Commands commands; |
46 |
| - registerCommandsBdx(commands); |
47 |
| - registerCommandsPairing(commands); |
48 |
| - registerCommandsDCL(commands); |
49 |
| - registerCommandsDelay(commands); |
50 |
| - registerCommandsDiscover(commands); |
51 |
| - registerCommandsInteractive(commands); |
52 |
| - registerCommandsMemory(commands); |
53 |
| - registerCommandsPayload(commands); |
54 |
| - registerClusterOtaSoftwareUpdateProviderInteractive(commands); |
55 |
| - registerCommandsStorage(commands); |
56 |
| - registerCommandsConfiguration(commands); |
57 |
| - registerClusters(commands); |
58 |
| - exitCode = commands.Run(argc, (char **) argv); |
59 |
| - } |
60 |
| - return ConditionalLeaksCheck(exitCode); |
| 45 | + @autoreleasepool { |
| 46 | + dft::logging::Setup(); |
| 47 | + Commands commands; |
| 48 | + registerCommandsBdx(commands); |
| 49 | + registerCommandsPairing(commands); |
| 50 | + registerCommandsDCL(commands); |
| 51 | + registerCommandsDelay(commands); |
| 52 | + registerCommandsDiscover(commands); |
| 53 | + registerCommandsInteractive(commands); |
| 54 | + registerCommandsMemory(commands); |
| 55 | + registerCommandsPayload(commands); |
| 56 | + registerClusterOtaSoftwareUpdateProviderInteractive(commands); |
| 57 | + registerCommandsStorage(commands); |
| 58 | + registerCommandsConfiguration(commands); |
| 59 | + registerClusters(commands); |
| 60 | + exitCode = commands.Run(argc, (char **) argv); |
| 61 | + } |
| 62 | + exit(ConditionalLeaksCheck(exitCode)); |
| 63 | + }); |
| 64 | + |
| 65 | + dispatch_main(); |
| 66 | + return EXIT_SUCCESS; |
61 | 67 | }
|
0 commit comments