Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: add adaptive primitives for both fiber and pthread context #87

Merged

Conversation

hzlushiliang
Copy link
Contributor

  • Add FiberMutex primitive
  • Add FiberConditionVariable primitive
  • Add FiberSharedMutex primitive
  • Add FiberSleepFor primitive
  • Add FiberSleepUntil primitive
  • Add FiberLatch primitive
  • Add FiberEvent primitive
  • Add futex_notifier_test

Copy link

codecov bot commented Dec 7, 2023

Codecov Report

Merging #87 (157b4c3) into main (f99f77d) will decrease coverage by 0.07342%.
The diff coverage is 99.06542%.

Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                 @@
##                main         #87         +/-   ##
===================================================
- Coverage   81.79932%   81.72590%   -0.07342%     
===================================================
  Files            855         855                 
  Lines          33746       33791         +45     
===================================================
+ Hits           27604       27616         +12     
- Misses          6142        6175         +33     
Files Coverage Δ
trpc/coroutine/fiber.cc 89.65517% <100.00000%> (+0.36946%) ⬆️
trpc/coroutine/fiber.h 100.00000% <ø> (ø)
trpc/coroutine/fiber_condition_variable.h 100.00000% <ø> (ø)
trpc/coroutine/fiber_event.h 66.66667% <ø> (ø)
trpc/coroutine/fiber_latch.h 100.00000% <ø> (ø)
trpc/coroutine/fiber_shared_mutex.h 100.00000% <ø> (ø)
...odel/fiber/detail/scheduling/v1/scheduling_impl.cc 90.61033% <100.00000%> (+0.04429%) ⬆️
...odel/fiber/detail/scheduling/v2/scheduling_impl.cc 77.08333% <100.00000%> (+0.11997%) ⬆️
trpc/runtime/threadmodel/fiber/detail/waitable.h 92.00000% <100.00000%> (-0.30769%) ⬇️
trpc/util/thread/futex_notifier.h 88.00000% <100.00000%> (+13.00000%) ⬆️
... and 1 more

... and 11 files with indirect coverage changes

@@ -10,6 +10,7 @@

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是不是有一些头文件的注释和校验fiber环境没有改?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

确实,开源版本在主库的基础上加了很多注释,这些注释也要对应调整,我调整一下

@hzlushiliang hzlushiliang force-pushed the feature/fiber_primitive branch from 4289d43 to eecc9b5 Compare December 7, 2023 11:47
- Add FiberMutex primitive
- Add FiberConditionVariable primitive
- Add FiberSharedMutex primitive
- Add FiberSleepFor primitive
- Add FiberSleepUntil primitive
- Add FiberLatch primitive
- Add FiberEvent primitive
- Add futex_notifier_test
@hzlushiliang hzlushiliang force-pushed the feature/fiber_primitive branch from eecc9b5 to 157b4c3 Compare December 7, 2023 11:48
@helloopenworld helloopenworld merged commit 6a096d6 into trpc-group:main Dec 8, 2023
3 checks passed
@hzlushiliang hzlushiliang deleted the feature/fiber_primitive branch December 8, 2023 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants