/trunk/Examples/test-suite/go/director_thread_runme.go
# · Go · 28 lines · 19 code · 7 blank · 2 comment · 1 complexity · d882b53923a5f76a49d722642aed1b76 MD5 · raw file
- package main
- import . "./director_thread"
- type Derived struct {
- abi Foo
- } // From Foo
- func (p *Derived) Do_foo() {
- p.abi.SetVal(p.abi.GetVal() - 1)
- }
- func main() {
- // FIXME: This test fails until we fix callbacks from a
- // different thread.
- return
- p := &Derived{nil}
- d := NewDirectorFoo(p)
- p.abi = d
- d.Run()
- if d.GetVal() >= 0 {
- panic(d.GetVal())
- }
- d.Stop()
- }