I've tested in more than one SO, and the problem is the same. Try to increase the number of threads, in order to increase concurrency and you will get the same result.
Here is one copy running 1000 concurrent threads:
C:\test>junk4 -NTHREADS=1000 STOP: Tue May 19 16:26:26 2009 1000000 1242746771.5932.out
And this is 20 concurrent copies each running 100 concurrent threads each:
C:\test>for /l %i in ( 1,1,20 ) do @start /b junk4 -NTHREADS=100 STOP: Tue May 19 16:07:35 2009 100000 1242745650.6976.out STOP: Tue May 19 16:07:35 2009 100000 1242745651.0876.out STOP: Tue May 19 16:07:36 2009 100000 1242745651.15.out STOP: Tue May 19 16:07:37 2009 100000 1242745651.7896.out STOP: Tue May 19 16:07:48 2009 STOP: Tue May 19 16:07:48 2009 STOP: Tue May 19 16:07:49 2009 STOP: Tue May 19 16:07:50 2009 STOP: Tue May 19 16:07:51 2009 STOP: Tue May 19 16:07:51 2009 STOP: Tue May 19 16:07:51 2009 STOP: Tue May 19 16:07:51 2009 STOP: Tue May 19 16:07:52 2009 STOP: Tue May 19 16:07:52 2009 STOP: Tue May 19 16:07:52 2009 STOP: Tue May 19 16:07:52 2009 100000 1242745654.972.out 100000 1242745654.8784.out 100000 1242745656.0952.out STOP: Tue May 19 16:07:52 2009 STOP: Tue May 19 16:07:52 2009 STOP: Tue May 19 16:07:52 2009 STOP: Tue May 19 16:07:52 2009 100000 1242745656.142.out 100000 1242745656.1576.out 100000 1242745657.1092.out 100000 1242745657.1716.out 100000 1242745657.9048.out 100000 1242745657.5304.out 100000 1242745657.3432.out 100000 1242745657.2652.out 100000 1242745656.5476.out 100000 1242745655.596.out 100000 1242745655.8768.out 100000 1242745654.7536.out 100000 1242745654.3012.out
Nary a whiff of a problem. Still unconvinced it works fine here?
Is that other OS (I assume that's what you meant by SO?), based on the same kernel? Or compiled against the same CRT? Or both?
In reply to Re^5: Threads: How to share a FileHandle to Write
by BrowserUk
in thread Threads: How to share a FileHandle to Write
by gulden
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |