You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guide.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -250,7 +250,7 @@ class MyModule(Module):
250
250
251
251
## Contexts
252
252
253
-
FPS offers a `Context` class that allows to share objects independantly of modules. For instance, say you want to share a file object. Here is how you would do:
253
+
FPS offers a `Context` class that allows to share objects independently of modules. For instance, say you want to share a file object. Here is how you would do:
254
254
255
255
```py
256
256
from io import TextIOWrapper
@@ -301,7 +301,7 @@ Let's see what happened:
301
301
- The publisher can check that the published file is not used anymore with `await shared_file.freed()`.
302
302
- When the `context` is closed, it waits for every published object to be freed and then it proceeds with their teardown, if any.
303
303
304
-
Contexts ensure that objects are shared safely by their "owner" and that they are torn down when they are not being used anymore, by keeping references of "borrowers". Borrowers must collaborate by explicitly dropping objects when they are done using them. Owners can explicitly check that their objects are free to be disposed, althoug this is optional.
304
+
Contexts ensure that objects are shared safely by their "owner" and that they are torn down when they are not being used anymore, by keeping references of "borrowers". Borrowers must collaborate by explicitly dropping objects when they are done using them. Owners can explicitly check that their objects are free to be disposed, although this is optional.
Copy file name to clipboardExpand all lines: docs/index.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,3 +4,4 @@ FPS is a Fast Pluggable System. It was originally designed to create [Jupyverse]
4
4
-**configuration**: each module can be configured with a set of parameters accessible from the CLI, and an application can be created declaratively as a Python dictionary or a JSON file.
5
5
-**pluggability**: modules can share objects, allowing the use of late binding to connect pluggins at runtime.
6
6
-**concurrency**: modules have startup and teardown phases for managing asynchronous resources safely.
7
+
- borrow checker: shared objects are torn down until all borrowers drop their reference, avoiding the use of "dangling" resources.
0 commit comments