MCPcopy Index your code
hub / github.com/firecracker-microvm/firecracker-containerd / Wait

Method Wait

internal/vm/task_test.go:125–138  ·  view source on GitHub ↗
(_ context.Context, req *taskAPI.WaitRequest)

Source from the content-addressed store, hash-verified

123}
124
125func (s *mockTaskService) Wait(_ context.Context, req *taskAPI.WaitRequest) (*taskAPI.WaitResponse, error) {
126 reqCh, _ := s.waitRequests.LoadOrStore(req.ID, make(chan *taskAPI.WaitRequest, 128))
127 reqCh.(chan *taskAPI.WaitRequest) <- req
128
129 waitCh, _ := s.waitCh.Load(s.processID(req.ID, req.ExecID))
130 if waitCh != nil {
131 <-(waitCh.(chan struct{}))
132 }
133
134 return &taskAPI.WaitResponse{
135 ExitStatus: 0,
136 ExitedAt: protobuf.ToTimestamp(time.Now()),
137 }, nil
138}
139
140func (s *mockTaskService) PopWaitRequests(id string) (reqs []*taskAPI.WaitRequest) {
141 reqCh, _ := s.waitRequests.Load(id)

Callers 7

ServeMethod · 0.45
RunTaskFunction · 0.45
startMethod · 0.45
StdinOutputMethod · 0.45
StdoutOutputMethod · 0.45
StderrOutputMethod · 0.45
monitorExitMethod · 0.45

Calls 1

processIDMethod · 0.95

Tested by

no test coverage detected