Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update queue.go#1

Open
tangseng wants to merge 1 commit intohuichen:master from
tangseng:master
Open

Update queue.go #1
tangseng wants to merge 1 commit intohuichen:master from
tangseng:master

Conversation

@tangseng
Copy link

@tangseng tangseng commented Jan 7, 2015

增加:
队列中任务超时的限制
整个队列的关闭
在 start 中判断 q.taskList.head == nil 成立时进行 q.Unlock() 以及 time.Sleep(time.Millisecond * 10)(避免cpu)

增加:
队列中任务超时的限制
整个队列的关闭
在 start 中判断 q.taskList.head == nil 成立时进行 q.Unlock() 以及 time.Sleep(time.Millisecond * 10)(避免cpu)
Copy link
Author

tangseng commented Jan 8, 2015

哦,Close()的想法是因为我这边会根据请求以及服务器的负载情况进行队列的新建或关闭。
Now()中不加的,想当对一个队列进行关闭操作后,队列可以继续将队列中剩余的任务执行完,当执行完后再关闭channel。
:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /