summaryrefslogtreecommitdiff
path: root/dispatch.go
diff options
context:
space:
mode:
Diffstat (limited to 'dispatch.go')
-rw-r--r--dispatch.go12
1 files changed, 1 insertions, 11 deletions
diff --git a/dispatch.go b/dispatch.go
index a6308709e..a5728ad81 100644
--- a/dispatch.go
+++ b/dispatch.go
@@ -1,10 +1,9 @@
// Copyright 2018 Ryan Dahl <ry@tinyclouds.org>
// All rights reserved. MIT License.
-package main
+package deno
import (
"github.com/golang/protobuf/proto"
- "github.com/ry/v8worker2"
"sync"
)
@@ -20,19 +19,10 @@ var stats struct {
v8workerBytesRecv int
}
-// There is a single global worker for this process.
-// This file should be the only part of deno that directly access it, so that
-// all interaction with V8 can go through a single point.
-var worker *v8worker2.Worker
-
var channels = make(map[string][]Subscriber)
type Subscriber func(payload []byte) []byte
-func createWorker() {
- worker = v8worker2.New(recv)
-}
-
func recv(buf []byte) (response []byte) {
stats.v8workerRecv++
stats.v8workerBytesRecv += len(buf)