Skip to content

Commit 638e567

Browse files
committed
Comment that we might need a check when writing to tasks
1 parent 3d35946 commit 638e567

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎Classes/Util/PBTask.m‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,12 @@ - (void)performTaskOnQueue:(dispatch_queue_t)queue terminationHandler:(void (^)(
147147
inputPipe.fileHandleForWriting.writeabilityHandler = ^(NSFileHandle *handle) {
148148
PBTaskLog(@"task %p: can write %d", weakSelf, handle.fileDescriptor);
149149

150+
unsigned long long position = handle.offsetInFile;
151+
PBTaskLog(@"task %p: at %lld", weakSelf, position);
150152
[handle writeData:weakSelf.standardInputData];
153+
if (handle.offsetInFile - position < weakSelf.standardInputData.length) {
154+
// Did not write everything ?
155+
}
151156
[handle closeFile];
152157
};
153158
}

0 commit comments

Comments
 (0)