Thread (28 messages) flat view 28 messages, 11 authors, 2019-04-02

Re: Make the git codebase thread-safe

From: Erik Faye-Lund <hidden>
Date: 2016-06-15 22:59:53

On Wed, Feb 12, 2014 at 7:20 PM, Stefan Zager [off-list ref] wrote:
On Wed, Feb 12, 2014 at 3:59 AM, Erik Faye-Lund [off-list ref] wrote:
quoted
On Wed, Feb 12, 2014 at 2:54 AM, Stefan Zager [off-list ref] wrote:
quoted
We are particularly concerned with the performance of msysgit, and we
have already chalked up a significant performance gain by turning on
the threading code in pack-objects (which was already enabled for
posix platforms, but not on msysgit, owing to the lack of a correct
pread implementation).
How did you manage to do this? I'm not aware of any way to implement
pread on Windows (without going down the insanity-path of wrapping and
potentially locking inside every IO operation)...
I don't want to steal the thunder of my coworker, who wrote the
implementation.  He plans to submit it upstream soon-ish.  It relies
on using the lpOverlapped argument to ReadFile(), with some additional
tomfoolery to make sure that the implicit position pointer for the
file descriptor doesn't get modified.
Is the code available somewhere? I'm especially interested in the
"additional tomfoolery to make sure that the implicit position pointer
for the file descriptor doesn't get modified"-part, as this was what I
ended up butting my head into when trying to do this myself.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help