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

Tobiasa/no capnp request #59

Closed
wants to merge 3 commits into from
Closed

Tobiasa/no capnp request #59

wants to merge 3 commits into from

Conversation

tobiasah
Copy link
Member

@tobiasah tobiasah commented Feb 28, 2024

This PR includes the following changes to improve the stability when exceptions are raised by pycapnp within RPC calls.

  • hiding the capnp stacktrace from exceptions (this should not be necessary but it does not hurt ... the c++ trace is anyway not included)
  • adding the loop manager and locks to prevent that rpc calls can be made without the kj eventloop running. (+ the loop can not be closed when a rpc call is in progress)
  • do not use request objects in our core but use plain function calls to avoid having c++ references in the python code

rayklauck and others added 3 commits February 28, 2024 08:26
This commits adds a barrier for exceptions raised within in the
core session and the underlying capnp.
This commit adds a custom loop manager that manages the lifetime
of the kj eventloop used by capnp. The loop manager exposes a
destroy function that when called prevents any further operation
to capnp. By default this function is registered to the exit of
the asyncio event loop. However if needed the user can create an
instace of the loop manager before creating a session and manage
the lifeime of the loop manager itself. This is especially usefull
when the eventloop is stoped and reentered multiple times.
This commit removes the requests mechanism and replaces it with
plain function calls. This prevent the existance from references
in the python code to capnp and therefore improves the stability
in case of exceptions.
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (0ad58a0) to head (07fb3cf).

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #59   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           33        33           
  Lines         1911      1937   +26     
  Branches       294       321   +27     
=========================================
+ Hits          1911      1937   +26     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tobiasah tobiasah closed this Sep 12, 2024
@tobiasah tobiasah deleted the tobiasa/no_capnp_request branch September 19, 2024 11:14
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