Windows: Implement asynchronous functions as threads.

In upload-pack we must explicitly close the output channel of rev-list.
(On Unix, the channel is closed automatically because process that runs
rev-list terminates.)

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
This commit is contained in:
Johannes Sixt
2007-12-08 22:19:14 +01:00
parent be501813d2
commit 618ebe9ff9
3 changed files with 35 additions and 1 deletions

View File

@ -76,7 +76,12 @@ struct async {
int (*proc)(int fd, void *data);
void *data;
int out; /* caller reads from here and closes it */
#ifndef __MINGW32__
pid_t pid;
#else
HANDLE tid;
int fd_for_proc;
#endif
};
int start_async(struct async *async);