Skip to content

Commit

Permalink
make set_dataset and mutate_dataset async RPCs
Browse files Browse the repository at this point in the history
sbourdeauducq committed Nov 1, 2016
1 parent 18ae8d5 commit 43cd970
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions artiq/language/environment.py
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@

from artiq.protocols import pyon
from artiq.language import units
from artiq.language.core import rpc


__all__ = ["NoDefault",
@@ -274,6 +275,7 @@ def setattr_device(self, key):
kernel_invariants = getattr(self, "kernel_invariants", set())
self.kernel_invariants = kernel_invariants | {key}

@rpc(flags={"async"})
def set_dataset(self, key, value,
broadcast=False, persist=False, save=True):
"""Sets the contents and handling modes of a dataset.
@@ -290,6 +292,7 @@ def set_dataset(self, key, value,
"""
self.__dataset_mgr.set(key, value, broadcast, persist, save)

@rpc(flags={"async"})
def mutate_dataset(self, key, index, value):
"""Mutate an existing dataset at the given index (e.g. set a value at
a given position in a NumPy array)

0 comments on commit 43cd970

Please sign in to comment.