Merge pull request #153 from wattygetlood/windows_patches

Windows patches
readme_bumpz
goodboy 2021-04-06 11:55:51 -04:00 committed by GitHub
commit feb8d5bbad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -22,7 +22,9 @@ from sys import byteorder
from typing import List, Tuple, Optional from typing import List, Tuple, Optional
from multiprocessing.shared_memory import SharedMemory, _USE_POSIX from multiprocessing.shared_memory import SharedMemory, _USE_POSIX
from multiprocessing import resource_tracker as mantracker from multiprocessing import resource_tracker as mantracker
from _posixshmem import shm_unlink
if _USE_POSIX:
from _posixshmem import shm_unlink
import tractor import tractor
import numpy as np import numpy as np
@ -73,7 +75,7 @@ class SharedInt:
@value.setter @value.setter
def value(self, value) -> None: def value(self, value) -> None:
self._shm.buf[:] = value.to_bytes(4, byteorder) self._shm.buf[:] = value.to_bytes(self._shm.size, byteorder)
def destroy(self) -> None: def destroy(self) -> None:
if _USE_POSIX: if _USE_POSIX:

View File

@ -197,6 +197,7 @@ def run_qtractor(
async with maybe_open_pikerd( async with maybe_open_pikerd(
name='qtractor', name='qtractor',
start_method='trio',
**tractor_kwargs, **tractor_kwargs,
): ):
await func(*((widgets,) + args)) await func(*((widgets,) + args))