Guest User

Untitled

a guest
Jan 24th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. func (vm *VM) newThread() *thread {
  2. s := &stack{RWMutex: new(sync.RWMutex)}
  3. cfs := &callFrameStack{callFrames: []callFrame{}}
  4. t := &thread{stack: s, callFrameStack: cfs, sp: 0, cfp: 0}
  5. s.thread = t
  6. cfs.thread = t
  7. t.vm = vm
  8. return t
  9. }
Add Comment
Please, Sign In to add comment