turbopipe 1.1.0__cp37-cp37m-win_amd64.whl → 1.2.0__cp37-cp37m-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of turbopipe might be problematic. Click here for more details.
- turbopipe/__init__.py +9 -6
- turbopipe/_turbopipe.cp37-win_amd64.pyd +0 -0
- {turbopipe-1.1.0.dist-info → turbopipe-1.2.0.dist-info}/METADATA +1 -1
- turbopipe-1.2.0.dist-info/RECORD +7 -0
- turbopipe-1.1.0.dist-info/RECORD +0 -7
- {turbopipe-1.1.0.dist-info → turbopipe-1.2.0.dist-info}/License.md +0 -0
- {turbopipe-1.1.0.dist-info → turbopipe-1.2.0.dist-info}/WHEEL +0 -0
turbopipe/__init__.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Union
|
|
1
|
+
from typing import Optional, Union
|
|
2
2
|
|
|
3
3
|
from moderngl import Buffer
|
|
4
4
|
|
|
@@ -7,8 +7,8 @@ from turbopipe import _turbopipe
|
|
|
7
7
|
|
|
8
8
|
def pipe(buffer: Union[Buffer, memoryview], fileno: int) -> None:
|
|
9
9
|
"""
|
|
10
|
-
Pipe the content of a moderngl.Buffer or memoryview to a file descriptor,
|
|
11
|
-
|
|
10
|
+
Pipe the content of a moderngl.Buffer or memoryview to a file descriptor, fast, threaded and
|
|
11
|
+
blocking when needed. Call `sync(buffer)` before this, and `sync()` when done for
|
|
12
12
|
|
|
13
13
|
Usage:
|
|
14
14
|
```python
|
|
@@ -29,9 +29,12 @@ def pipe(buffer: Union[Buffer, memoryview], fileno: int) -> None:
|
|
|
29
29
|
_turbopipe.pipe(buffer, fileno)
|
|
30
30
|
del buffer
|
|
31
31
|
|
|
32
|
-
def sync() -> None:
|
|
33
|
-
"""Waits for all
|
|
34
|
-
|
|
32
|
+
def sync(buffer: Optional[Union[Buffer, memoryview]]=None) -> None:
|
|
33
|
+
"""Waits for any pending write operation on a buffer, or 'all buffers' if None, to finish"""
|
|
34
|
+
if isinstance(buffer, Buffer):
|
|
35
|
+
buffer = memoryview(buffer.mglo)
|
|
36
|
+
_turbopipe.sync(buffer)
|
|
37
|
+
del buffer
|
|
35
38
|
|
|
36
39
|
def close() -> None:
|
|
37
40
|
"""Syncs and deletes objects"""
|
|
Binary file
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
turbopipe-1.2.0.dist-info/METADATA,sha256=GshXnXUHFzM7sZFhvu3nDaTtgbgWA6PpjWNw6lyQ_78,21721
|
|
2
|
+
turbopipe-1.2.0.dist-info/WHEEL,sha256=Nev81HRaPPFaJxtPw0V0OVn7-92Nc0ABJrwOL0z7AP0,84
|
|
3
|
+
turbopipe-1.2.0.dist-info/License.md,sha256=s3HF089BzBa_7DenpGj5kPHBu-XhGLP6gRzhhhLXLls,1096
|
|
4
|
+
turbopipe/_turbopipe.cp37-win_amd64.pyd,sha256=boF65KV_-riyaVZ3V950anHofM9fNORw202Ap1m-CoM,35840
|
|
5
|
+
turbopipe/_turbopipe.cp37-win_amd64.lib,sha256=692EPK2cLZGxK9urE2rAZDkOeztz55MeiVTt3eB8PaA,2052
|
|
6
|
+
turbopipe/__init__.py,sha256=D0FP-CR87qJeLGv_VYCGRcwdONFhBYt02D2bm4Xdax4,1346
|
|
7
|
+
turbopipe-1.2.0.dist-info/RECORD,,
|
turbopipe-1.1.0.dist-info/RECORD
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
turbopipe-1.1.0.dist-info/METADATA,sha256=Itv2IFMZrJ8xqux7KHkdOy4LbynPpE5mhyJ2--brLpY,21721
|
|
2
|
-
turbopipe-1.1.0.dist-info/WHEEL,sha256=Nev81HRaPPFaJxtPw0V0OVn7-92Nc0ABJrwOL0z7AP0,84
|
|
3
|
-
turbopipe-1.1.0.dist-info/License.md,sha256=s3HF089BzBa_7DenpGj5kPHBu-XhGLP6gRzhhhLXLls,1096
|
|
4
|
-
turbopipe/_turbopipe.cp37-win_amd64.pyd,sha256=qUwuVe0U8549sNSu8WRxSLoZGDHQsPpdxJGplhWGljI,35328
|
|
5
|
-
turbopipe/_turbopipe.cp37-win_amd64.lib,sha256=692EPK2cLZGxK9urE2rAZDkOeztz55MeiVTt3eB8PaA,2052
|
|
6
|
-
turbopipe/__init__.py,sha256=Lo3flpn7uicWWUrZZiRt7oYGP33gZo8VyKll50yxTHA,1087
|
|
7
|
-
turbopipe-1.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|