PageRenderTime 19ms CodeModel.GetById 14ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/trunk/Examples/test-suite/go/director_thread_runme.go

#
Go | 28 lines | 19 code | 7 blank | 2 comment | 1 complexity | d882b53923a5f76a49d722642aed1b76 MD5 | raw file
 1package main
 2
 3import . "./director_thread"
 4
 5type Derived struct {
 6	abi Foo
 7} // From Foo
 8func (p *Derived) Do_foo() {
 9	p.abi.SetVal(p.abi.GetVal() - 1)
10}
11
12func main() {
13
14	// FIXME: This test fails until we fix callbacks from a
15	// different thread.
16	return
17
18	p := &Derived{nil}
19	d := NewDirectorFoo(p)
20	p.abi = d
21	d.Run()
22
23	if d.GetVal() >= 0 {
24		panic(d.GetVal())
25	}
26
27	d.Stop()
28}