campoy / todo Goto Github PK
View Code? Open in Web Editor NEWA task manager written in Go using TDD techniques, each commit should represent a step in the application development.
License: Apache License 2.0
A task manager written in Go using TDD techniques, each commit should represent a step in the application development.
License: Apache License 2.0
go version go1.2.1 (appengine-1.9.1) windows/amd64
Failed parsing input: app file server.go conflicts with same file imported from GOPATH
Seems the same issue as this though I am not sure how to fix it..
HTTP handlers can and will be called concurrently from multiple goroutines, but the TaskManager doesn't protect against race conditions. The easiest thing would be to add a sync.Mutex to TaskManager and lock it during Save, All, and Find. Also All needs to copy the slice before returning so that the internal slice isn't used unprotected by the Mutex.
When I click on the "Run" button on slide 13, I get the following compilation error message:
fatal error: all goroutines are asleep - deadlock!
goroutine 16 [semacquire]:
sync.runtime_Syncsemacquire(0x10626430, 0x1)
/tmp/sandbox/go/src/pkg/runtime/sema.goc:257 +0x120
sync.(*Cond).Wait(0x10626428, 0x10626420)
/tmp/sandbox/go/src/pkg/sync/cond.go:62 +0x100
syscall.(*queue).waitRead(0x10626420, 0x1, 0x0, 0x0, 0x43ca80, 0x0, 0x0, 0x4e8a)
/tmp/sandbox/go/src/pkg/syscall/net_nacl.go:262 +0x1a0
syscall.(*msgq).read(0x10626420, 0x106280f0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/tmp/sandbox/go/src/pkg/syscall/net_nacl.go:376 +0xe0
syscall.(*netFile).accept(0x10652200, 0x4e8a, 0x10652200, 0x0, 0x0, 0x0, 0x0, 0x0)
/tmp/sandbox/go/src/pkg/syscall/net_nacl.go:538 +0x80
syscall.Accept(0x3, 0x0, 0x2f9e70, 0x0, 0x0, 0x0, 0x0, 0xfeee1d88)
/tmp/sandbox/go/src/pkg/syscall/net_nacl.go:752 +0xc0
net.accept(0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfefc0000)
/tmp/sandbox/go/src/pkg/net/sys_cloexec.go:42 +0x60
net.(*netFD).accept(0x10652240, 0x364318, 0x0, 0x0, 0x0, 0x10652240)
/tmp/sandbox/go/src/pkg/net/fd_unix.go:406 +0x340
net.(*TCPListener).AcceptTCP(0x1060e2c8, 0xfeee1e70, 0x10, 0x0, 0x0, 0x106183f0)
/tmp/sandbox/go/src/pkg/net/tcpsock_posix.go:234 +0x80
net/http.tcpKeepAliveListener.Accept(0x1060e2c8, 0x10622960, 0x0, 0x0, 0x0, 0x0)
/tmp/sandbox/go/src/pkg/net/http/server.go:1947 +0x60
net/http.(*Server).Serve(0x106521c0, 0xfefd0578, 0x1060e2c8, 0xfeee1f24, 0x0, 0x0)
/tmp/sandbox/go/src/pkg/net/http/server.go:1698 +0xc0
net/http.(*Server).ListenAndServe(0x106521c0, 0x4e8a, 0x0, 0x0)
/tmp/sandbox/go/src/pkg/net/http/server.go:1688 +0x1c0
net/http.ListenAndServe(0x2fa488, 0x5, 0x0, 0x0, 0x0, 0x0)
/tmp/sandbox/go/src/pkg/net/http/server.go:1778 +0xc0
main.main()
/tmpfs/gosandbox-46b43f26_5eebf313_c3ba907d_d69ba1e6_9c32ab09/prog.go:14 +0xa0
goroutine 19 [finalizer wait]:
runtime.park(0x38bc0, 0x43c004, 0x436b69, 0x0)
/tmp/sandbox/go/src/pkg/runtime/proc.c:1369 +0xc0
runtime.parkunlock(0x43c004, 0x436b69)
/tmp/sandbox/go/src/pkg/runtime/proc.c:1385 +0x60
runfinq()
/tmp/sandbox/go/src/pkg/runtime/mgc0.c:2644 +0x100
runtime.goexit()
/tmp/sandbox/go/src/pkg/runtime/proc.c:1445
[process exited with non-zero status]
Program exited.
Is that something you can reproduce?
Cheers
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.