Skip to content

Commit

Permalink
五一快乐,隔离一时爽,一直隔离一直爽
Browse files Browse the repository at this point in the history
  • Loading branch information
QuinnDK committed May 4, 2020
1 parent 1365730 commit 0155cb2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
15 changes: 0 additions & 15 deletions engine/concurrentengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,6 @@ import (
"log"
)

type Scheduler interface {
Submit(Request)

configureWorkChan(chan Request)
}

type ConcurrentEngine struct {
Scheduler Scheduler
Workcount int
}

type SimpleScheduler struct {
workerchan chan Request
}

func (s *SimpleScheduler) Submit(r Request) {

s.workerchan <- r
Expand Down
1 change: 1 addition & 0 deletions scheduler/quequescheduler.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package scheduler
18 changes: 18 additions & 0 deletions scheduler/simpleScheduler.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package scheduler

import "crawl/engine"

type Scheduler interface {
Submit(engine.Request)

configureWorkChan(chan engine.Request)
}

type ConcurrentEngine struct {
Scheduler Scheduler
Workcount int
}

type SimpleScheduler struct {
workerchan chan engine.Request
}

0 comments on commit 0155cb2

Please sign in to comment.