Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jacobsa-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
jacobsa-fuse
Commits
365f2197
Commit
365f2197
authored
May 05, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New begin/finish interface. Not yet wired.
parent
be24b2b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
connection.go
connection.go
+11
-3
No files found.
connection.go
View file @
365f2197
...
...
@@ -85,13 +85,21 @@ func (c *Connection) log(
c
.
logger
.
Println
(
msg
)
}
// Set up state for an op that is about to be returned to the user.
func
(
c
*
Connection
)
beginOp
()
{
// Set up state for an op that is about to be returned to the user, given its
// bazilfuse request ID.
//
// Return a context that should be used for the op.
func
(
c
*
Connection
)
beginOp
(
reqID
bazilfuse
.
RequestID
)
(
ctx
context
.
Context
)
{
c
.
opsInFlight
.
Add
(
1
)
// TODO(jacobsa): Use WithCancel and stash a cancellation function.
ctx
=
c
.
parentCtx
return
}
// Clean up all state associated with an op to which the user has responded.
func
(
c
*
Connection
)
finishOp
()
{
func
(
c
*
Connection
)
finishOp
(
reqID
bazilfuse
.
RequestID
)
{
c
.
opsInFlight
.
Done
()
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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