mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[driver] Rework the Unix implementation of TaskQueue::execute() to support reading from pipes as they fill, instead of all at once at the end.
Instead of always calling waitpid() and looking for the termination of a task, call poll() and watch for events on the pipes which are used for buffering subtask output. When we receive a POLLIN or POLLPRI event, ask the corresponding Task to read from the pipe; when we receive a POLLHUP or POLLERR event, wait for the subtask to finish and then ask the Task to perform its post-execution tasks. Now that the Unix implementation properly handles large amounts of subtask output, re-enable the Unix implementation (if supported). This fixes <rdar://problem/15795234>. Swift SVN r12293
This commit is contained in:
@@ -23,9 +23,7 @@ using namespace swift;
|
||||
using namespace swift::sys;
|
||||
|
||||
// Include the correct TaskQueue implementation.
|
||||
// TODO: re-enable Unix implementation once output buffering works correctly
|
||||
// (<rdar://problem/15795234>).
|
||||
#if 0 && LLVM_ON_UNIX
|
||||
#if LLVM_ON_UNIX
|
||||
#include "Unix/TaskQueue.inc"
|
||||
#else
|
||||
#include "Default/TaskQueue.inc"
|
||||
|
||||
Reference in New Issue
Block a user