Give event loop it's own thread

This commit is contained in:
Michael Crosby 2015-11-13 14:13:13 -08:00
parent 18338b29a1
commit 371226d314
1 changed files with 2 additions and 0 deletions

View File

@ -3,6 +3,7 @@ package containerd
import ( import (
"os" "os"
"path/filepath" "path/filepath"
"runtime"
"sync" "sync"
"github.com/Sirupsen/logrus" "github.com/Sirupsen/logrus"
@ -71,6 +72,7 @@ func (s *Supervisor) Start(events chan *Event) error {
} }
s.events = events s.events = events
go func() { go func() {
runtime.LockOSThread()
for e := range events { for e := range events {
s.journal.write(e) s.journal.write(e)
switch e.Type { switch e.Type {