|
Tamás Gulácsi |
at Mar 7, 2013 at 6:14 am
|
⇧ |
| |
It works for me
gthomas@waterhouse /tmp % go test -v x_test.go
warning: building out-of-date packages:
flag
text/tabwriter
runtime/pprof
testing
installing these packages with 'go test -i x_test.go' will speed future
tests.
=== RUN TestStoreFileSave
updated value 12345789 /tmp/filesave
written 8
updated value 12345789 /tmp/filesave
written 8
12345789
--- PASS: TestStoreFileSave (2.00 seconds)
PASS
ok command-line-arguments 2.018s
gthomas@waterhouse /tmp % go version
go version devel +08dc15884e88 Mon Feb 25 08:29:46 2013 -0800 linux/amd64
GThomas
2013. március 7., csütörtök 6:57:36 UTC+1 időpontban davy zhang a
következőt írta:
I used sync and os.O_SYNC
http://play.golang.org/p/q5SA0eV2pibut the result is the same
but when manually open the file using less /tmp/filesave
the content is there! So the file is written actually but the problem is
the way I read it?
On Thursday, March 7, 2013 1:45:00 PM UTC+8, davy zhang wrote:but when I put
time.Sleep(1 * time.Second)
after the
<-time.Tick(2 * time.Second)
the file can be read after that, so is there explanation ?
On Thursday, March 7, 2013 1:42:21 PM UTC+8, davy zhang wrote:code first
http://play.golang.org/p/YldOJZNg1aits been report written 2 times, but after 2 seconds tick the main
function can not read the content of the file
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit
https://groups.google.com/groups/opt_out.