Lakr233 / FixTim

Fix every runtime bug on macOS.
MIT License
1.01k stars 21 forks source link

[Help Wanted] Identify Reboot Complete #8

Open Lakr233 opened 7 months ago

Lakr233 commented 7 months ago

Before calling reopen apps, wait for reboot to complete.

Lakr233 commented 7 months ago

@Kyle-Ye !!!

Kyle-Ye commented 7 months ago

The current implementation use sleep(5) as a workaround.

https://github.com/Lakr233/FixTim/blob/4d3acf7f390d3058c0359823988d4522427b87a8/FixTim/App.swift#L272

IMO, if we can get the count of iterateBlock execution. We can use a counter(dispatch_semaphore_t) here and add it in the end of iterateBlock.

https://github.com/Lakr233/FixTim/blob/4d3acf7f390d3058c0359823988d4522427b87a8/FixTim/Restart.swift#L52

On the caller site, we can then wait it.