working workers in browser

This commit is contained in:
Barak Michener 2020-12-04 20:45:19 -08:00
parent 56116aea2a
commit 715f79c9c0
13 changed files with 343 additions and 28 deletions

View file

@ -3,7 +3,6 @@ package main
import (
"encoding/binary"
"errors"
"fmt"
"sync"
"time"
@ -63,7 +62,6 @@ func (mem *MemObjectStore) AwaitObjects(ids []ObjectID, c chan ObjectResult, tim
v, ok := mem.db[id]
if !ok {
waitingFor[id] = true
fmt.Println("want", id)
} else {
found++
c <- ObjectResult{&Object{ID: id, Data: v}, nil}