Pull Request Opened #github #golang

[email protected] Integration <[email protected]> Mon, 06 Mar 2017 08:37:45 -0800
Newsgroups gmane.comp.sysutils.pcp
Message-ID <[email protected]>
--yabbadabbadoo
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable



[performancecopilot/speed] Pull request opened by saurvs ( https://github.c=
om/saurvs ) :

#41 Port Speed to Windows ( https://github.com/performancecopilot/speed/pu=
ll/41 )

This makes Speed compile and pass all tests on Windows.

The following chances were made:

* Use mmap-go instead of syscall in memorymappedwriter.go .
* Import path/filepath instead of path in multiple files to make path-rela=
ted functionality OS-independent.
* And this is something I discovered while working on this. On Unix, you c=
an call remove on a file that is still opened and have everything go smooth=
ly; the file gets deleted when all it's handles are closed. But on Windows,=
 trying to remove a file that's still open results in a The process cannot =
access the file because it is being used by another process error. Hence, f=
ile handles need to be closed at two places in the code.

I also added the printing of an err message in a t.Errorf call which helpe=
d me while debugging the third issue.



--yabbadabbadoo
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable




[performancecopilot/speed] Pull request opened by <a href=3D"https://githu=
b.com/saurvs">saurvs</a>:<p>

<a href=3D"https://github.com/performancecopilot/speed/pull/41">#41 Port S=
peed to Windows</a><br>
<p>This makes Speed compile and pass all tests on Windows.</p>

<p>The following chances were made:</p>

<ul>
<li>Use <code>mmap-go</code> instead of <code>syscall</code> in <code>memo=
rymappedwriter.go</code>.</li>
<li>Import <code>path/filepath</code> instead of <code>path</code> in mult=
iple files to make path-related functionality OS-independent.</li>
<li>And this is something I discovered while working on this. On Unix, you=
 can call <code>remove</code> on a file that is still opened and have every=
thing go smoothly; the file gets deleted when all it's handles are closed. =
But on Windows, trying to remove a file that's still open results in a <cod=
e>The process cannot access the file because it is being used by another pr=
ocess</code> error. Hence, file handles need to be closed at two places in =
the code.</li>
</ul>

<p>I also added the printing of an <code>err</code> message in a <code>t.E=
rrorf</code> call which helped me while debugging the third issue.</p>

<p>


<div width=3D"1" style=3D"color:white;clear:both">_._,_._,_</div>
<hr>
Groups.io Links:<p>

You receive all messages sent to this group.


<p>

<a target=3D"_blank" href=3D"https://groups.io/g/pcp/message/15333">View/R=
eply Online (#15333)</a> |


  <a target=3D"_blank" href=3D"mailto:[email protected]?subject=3DRe:%20%5Bpcp=
%5D%20Pull%20Request%20Opened%20%23github%20%23golang">Reply To Group</a>
  
    | <a target=3D"_blank" href=3D"mailto:?subject=3DRe:%20%5Bpcp%5D%20Pul=
l%20Request%20Opened%20%23github%20%23golang">Reply To Sender</a>
  


|


  <a target=3D"_blank" href=3D"https://groups.io/mt/4462727?uid=3D174580">=
Mute This Topic</a>
=20
| <a href=3D"https://groups.io/g/pcp/post">New Topic</a><br>



<a href=3D"https://groups.io/mk?hashtag=3Dgithub&subid=3D354243">Mute #git=
hub</a>

|
<a href=3D"https://groups.io/mk?hashtag=3Dgolang&subid=3D354243">Mute #gol=
ang</a>

<p>

<p>pcp mailing list<br />[email protected]<br /><a href=3D"https://groups.io/g=
/pcp/messages" target=3D"_blank">https://groups.io/g/pcp/messages</a></p>

<a href=3D"https://groups.io/g/pcp/editsub?uid=3D174580">Change Your Subsc=
ription</a><br>
<a href=3D"https://groups.io/g/pcp">Group Home</a><br>
<a href=3D"mailto:[email protected]">Contact Group Owner</a><br>
<a href=3D"https://groups.io/static/tos">Terms Of Service</a><br>
<a href=3D"https://groups.io/g/pcp/leave/354243/563757577/xyzzy">Unsubscri=
be From This Group</a><br>

<div width=3D"1" style=3D"color:white;clear:both">_._,_._,_</div>


--yabbadabbadoo--