Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool-module
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool-module
Commits
49da2638
Commit
49da2638
authored
1 year ago
by
Georgy Moshkin
Browse files
Options
Downloads
Patches
Plain Diff
feat: fiber::Builder::{start_non_joinable, defer_non_joinable}
parent
d66d3e42
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!444
Gmoshkin/fix fiber detach
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+4
-0
4 additions, 0 deletions
CHANGELOG.md
tarantool/src/cbus/mod.rs
+2
-2
2 additions, 2 deletions
tarantool/src/cbus/mod.rs
tarantool/src/fiber.rs
+350
-55
350 additions, 55 deletions
tarantool/src/fiber.rs
with
356 additions
and
57 deletions
CHANGELOG.md
+
4
−
0
View file @
49da2638
...
...
@@ -24,6 +24,10 @@
-
`fiber::JoinHandle::wakeup`
for waking up the fiber by it's join handle.
-
`fiber::cancel`
function for cancelling the fiber by id.
-
`fiber::wakeup`
function for waking up the fiber by id.
-
`fiber::Builder::{start_non_joinable, defer_non_joinable}`
functions for
spawning non-joinable fibers. These functions return the fiber id, if the
corresponding api is supported in your tarantool version. If not, you can use
`fiber::id`
, which works on older versions by using lua api.
-
`fiber::Cond::wait_deadline`
for waiting until
`tarantool::time::Instant`
rather than a
`Duration`
. Uses
`fiber::clock`
internally.
-
`fiber::r#async::timeout::{deadline, IntoTimeout::deadline}`
for constraining
...
...
This diff is collapsed.
Click to expand it.
tarantool/src/cbus/mod.rs
+
2
−
2
View file @
49da2638
...
...
@@ -247,9 +247,9 @@ mod tests {
let
cbus_endpoint
=
cbus
::
Endpoint
::
new
(
endpoint_name
)
.unwrap
();
cbus_endpoint
.cbus_loop
();
})
.start
()
.start
_non_joinable
()
.expect
(
"failed to start the cbus_fiber"
)
.
detach
(
)
.
expect
(
"fiber_id should be supported"
)
}
#[crate::test(tarantool
=
"crate"
)]
...
...
This diff is collapsed.
Click to expand it.
tarantool/src/fiber.rs
+
350
−
55
View file @
49da2638
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment