Re: [PATCH 5/4] run-command: implement abort_async for pthreads
- From
Jeff King <peff@peff.net>
- Date
- Apr 1, 2011, 20:18 UTC
- Message-ID
- <20110401201801.GA16602@sigill.intra.peff.net>
- In-Reply-To
- <20110401201714.GA16501@sigill.intra.peff.net>
On Fri, Apr 01, 2011 at 04:17:14PM -0400, Jeff King wrote:
Show 9 quoted lines
> > static inline int pthread_cancel(pthread_t thread)
> > {
> > SetEvent(thread.cancel_event);
> > CancelSynchronousIo(thread.handle);
> > }
>
> There are a ton of cancellation points, not just I/O (e.g., sleep).
> However, interrupting a read would probably be sufficient for git's
> purposes.Actually, I take that back. It would be sufficient for abort_async with its current callers, but adding a pthread_cancel that is only partially there may end up causing headaches down the road.
-Peff