TaskDescription.waitForAllTaskTermination() on waitOnCommand()#519
Conversation
Fix segmentation fault on termination. Carthage#474 (comment)
There was a problem hiding this comment.
Should this be finer-grained, e.g. waiting per-task when they’re executed?
There was a problem hiding this comment.
I can't determine where I should place dispatch_group_wait() on another place.
RAC's completed event timing is not fit for place it.
There was a problem hiding this comment.
The segmentation fault happens while disposing after completed event from launch task's thread and main thread calling exit() concurrently.
Waiting per-task will need waiting some RAC event. That will be same what just current implementation is doing.
I think fixing the segmentation fault needs doing outside of RAC event, and waiting per-task without RAC event may be too complicated unnecessarily.
|
I’ve merged the dependency and have a beta tag of ReactiveTask to include it. Could you please update the |
|
Once that’s done I think we can merge and release a new beta of Carthage. I may not be aesthetically content with waiting for all child processes like this, but I can’t argue with its results. |
|
I've pushed the commit updating the |
|
Thanks very much! |
TaskDescription.waitForAllTaskTermination() on waitOnCommand()
|
You're welcome. 🙇 |
This is rebased version of #496.
Fix segmentation fault on termination of Carthage.
Segmentation fault on termination of Carthage 0.7.4 beta-2 happens following scenario:
sendCompleted()and kick main thread2a. main thread wake up and call
exit()2b. launchTask's thread continue disposing
Waiting
completedfrom launchTask's thread is not enough for fixing the segmentation fault.It needs waiting actual termination of launchTask's thread
This PR depends on Carthage/ReactiveTask#24
#474 (comment)