Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Vladimir Barsukov
zGo
Commits
2b1f0890
Commit
2b1f0890
authored
Nov 17, 2023
by
Vladimir Barsukov
Browse files
zgo
parent
edf82d61
Changes
2
Hide whitespace changes
Inline
Side-by-side
zq/zq.go
View file @
2b1f0890
...
@@ -62,12 +62,14 @@ func (q *ZQ) RemoveWorker() {
...
@@ -62,12 +62,14 @@ func (q *ZQ) RemoveWorker() {
q
.
AddWorker
(
-
1
)
q
.
AddWorker
(
-
1
)
}
}
func
(
q
*
ZQ
)
AddJob
(
a
any
)
{
func
(
q
*
ZQ
)
AddJob
(
a
any
)
*
ZQ
{
q
.
JobsWg
.
Inc
()
q
.
JobsWg
.
Inc
()
go
func
()
{
go
func
()
{
q
.
jobs
<-
a
q
.
jobs
<-
a
}()
}()
return
q
}
}
func
(
q
*
ZQ
)
Wait
()
{
func
(
q
*
ZQ
)
Wait
()
{
...
...
zquit/zquit.go
View file @
2b1f0890
...
@@ -72,3 +72,7 @@ func (q *ZQuit) ZQuitMiddleware(c *gin.Context) {
...
@@ -72,3 +72,7 @@ func (q *ZQuit) ZQuitMiddleware(c *gin.Context) {
c
.
Next
()
c
.
Next
()
}
}
func
(
q
*
ZQuit
)
Shutdown
()
{
q
.
isQuit
=
true
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment